Solved

MDX Query Order by Date

Posted on 2013-01-18
3
442 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
  • 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Suggested Solutions

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now