Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Selecting a constant using MDX


Selecting a constant using MDX

Author
Message
s_osborne2
s_osborne2
Right there with Babe
Right there with Babe (745 reputation)Right there with Babe (745 reputation)Right there with Babe (745 reputation)Right there with Babe (745 reputation)Right there with Babe (745 reputation)Right there with Babe (745 reputation)Right there with Babe (745 reputation)Right there with Babe (745 reputation)

Group: General Forum Members
Points: 745 Visits: 2292
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...

SELECT 
   NON EMPTY { [Measures].[Policy Count] } ON COLUMNS,
   NON EMPTY { ( [Insurer].[Insurer].[Insurer].ALLMEMBERS * [Product].[Product].[Product].ALLMEMBERS ) } ON ROWS
FROM
   (
    SELECT
      { [Time].[Year].&[2012] } ON COLUMNS
    FROM
      [MyCube]   
   Wink
WHERE
   [Time].[Year].&[2012];



I'd like the output to look something like this:

PolicyCount
Constant   Insurer   Product   N
Constant   Insurer   Product   N
Constant   Insurer   Product   N
Constant   Insurer   Product   N
Constant   Insurer   Product   N

The 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



MCSE: Data Platform
MCSE: Business Intelligence
Follow me on Twitter: @WazzTheBadger
LinkedIn Profile: Simon Osborne
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search