Solved

MDX Query Order by Date

Posted on 2013-01-18
3
463 Views
Last Modified: 2013-01-28
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]
0
Comment
Question by:vbnetcoder
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 28

Accepted Solution

by:
Ryan McCauley earned 500 total points
ID: 38813342
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.

http://msdn.microsoft.com/en-us/library/ms145587.aspx
0
 

Author Comment

by:vbnetcoder
ID: 38813987
It's not in the query and i am not sure how to add it ... that is a part of my problem...
0
 

Author Closing Comment

by:vbnetcoder
ID: 38827320
ty
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question