• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 477
  • Last Modified:

MDX Query Order by Date

How would i update this MDX to order by a field -- YearMonth

WITH MEMBER [Measures].[ParameterCaption] AS [Sales Period].[Sales Period Name].CURRENTMEMBER.MEMBER_CAPTION MEMBER [Measures].[ParameterValue] AS [Sales Period].[Sales Period Name].CURRENTMEMBER.UNIQUENAME MEMBER [Measures].[ParameterLevel] AS [Sales Period].[Sales Period Name].CURRENTMEMBER.LEVEL.ORDINAL SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS , [Sales Period].[Sales Period Name].ALLMEMBERS ON ROWS FROM [MasterCube]
  • 2
1 Solution
Ryan McCauleyData and Analytics ManagerCommented:
The value you're ordering would have to be somewhere in the query (I assume it's part of the "Sales Period" dimension you're working with), and the you'd use the ORDER() function.

vbnetcoderAuthor Commented:
It's not in the query and i am not sure how to add it ... that is a part of my problem...
vbnetcoderAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now