Link to home
Start Free TrialLog in
Avatar of vbnetcoder
vbnetcoder

asked on

Date parameter - order by date reverse

I have a drop down parameter by date --- is there any way to make the list go in reverse order by date?
ASKER CERTIFIED SOLUTION
Avatar of Simone B
Simone B
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vbnetcoder
vbnetcoder

ASKER

What I am doing is a little different because I am using SSAS cubes ... but I should be able to do that in the MDX. I will try
Yes, it will be the same thing. You need to specify the order in your parameter dataset. Sorry, I'm not an MDX-pert. The code is different, but the theory is the same. I'll poke around and see if I can find any examples.
Avatar of ValentinoV
Ordering in MDX is not really comparable to T-SQL.  But it can be done nevertheless!  What you need to use is the ORDER() function.

Hace a look at the following article for some more examples besides the ones on MSDN: Ordering a Dimension Hierarchy in MDX
Having trouble getting this to work (I know nothing about MDX :():

This is my MDX ..... how would i order by YearAndMonth (not currently a field in this query).

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]
This put me on the right track .... thank you.