﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Data Warehousing / Analysis Services  / Selecting a constant using MDX / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sun, 19 May 2013 17:27:20 GMT</lastBuildDate><ttl>20</ttl><item><title>Selecting a constant using MDX</title><link>http://www.sqlservercentral.com/Forums/Topic1383582-17-1.aspx</link><description>Hi,I'm a real newbie when it comes to writing MDX. I'm trying to build an ssrs report off a cube and so have used the query builder to build up the query i want to execute. I'd like to know how to select a string constant, if that's even possible...[code="sql"]SELECT 	NON EMPTY { [Measures].[Policy Count] } ON COLUMNS, 	NON EMPTY { ( [Insurer].[Insurer].[Insurer].ALLMEMBERS * [Product].[Product].[Product].ALLMEMBERS ) }  ON ROWS FROM 	( 	  SELECT 		{ [Time].[Year].&amp;[2012] } ON COLUMNS 	  FROM 		[MyCube]		) WHERE 	[Time].[Year].&amp;[2012];[/code]I'd like the output to look something like this:                                                PolicyCountConstant	Insurer	Product	NConstant	Insurer	Product	NConstant	Insurer	Product	NConstant	Insurer	Product	NConstant	Insurer	Product	NThe query i've got so far returns the insurer, the product and the policy count but i can't seem to work out how to select the constant. Google doesn't seem to have come up trumps for me either. Hopefully this is going to be dead easy for someone to answer...Thanks,Simon</description><pubDate>Mon, 12 Nov 2012 03:20:28 GMT</pubDate><dc:creator>s_osborne2</dc:creator></item></channel></rss>