Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

MDX Function to arrange months in correct order Expand / Collapse
Author
Message
Posted Wednesday, June 11, 2014 3:41 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, November 25, 2014 11:03 PM
Points: 115, Visits: 176
Hi,

I am actually not quite good at the MDX functions , so i have got one issue where i am unable to find the answer please help me out !!!!
I have got a Year Hierarchy and the levels are like this Year,Quarter,Month,Weekday,Day .
Now my problem is when I select a Quarter like say 'Q1' , i need to get the children of that Q1 ( Jan , Feb , Mar ) so i have used the Children function "...[Quarter].Children" .

I am getting the output , but i am not getting it is correct month order instead i am getting as "Feb , Jan , Mar "

I hope i was able to deliver my question , please help me out how to get the required output .
Post #1579551
Posted Wednesday, June 11, 2014 3:56 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 8:55 AM
Points: 13,570, Visits: 11,383
When you build your dimension, you need to include the ID (for example 01 for January) in the key of the month attribute. Then you need to put the OrderBy property to Key instead of Name.

Change Sort Options on Dimension Attributes in SQL Server Analysis Services




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1579555
Posted Wednesday, June 11, 2014 4:00 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, November 25, 2014 11:03 PM
Points: 115, Visits: 176
Koen Verbeeck (6/11/2014)
When you build your dimension, you need to include the ID (for example 01 for January) in the key of the month attribute. Then you need to put the OrderBy property to Key instead of Name.

Change Sort Options on Dimension Attributes in SQL Server Analysis Services


I agree to this but here actually the funtions are not written on the cube actually , we have a panorama necto tool where we are using the MDX functions, there we cant query like how we will be doing in MDX query of management studio, so i am thinking of any MDX or DAX functions that could solve my problem .
Post #1579556
Posted Wednesday, June 11, 2014 4:14 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 8:55 AM
Points: 13,570, Visits: 11,383
I see. Take a look at this article:

Order and Sort with MDX in SQL Server Analysis Services




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1579562
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse