MDX Function to arrange months in correct order

  • 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 .

  • 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[/url]

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • 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[/url]

    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 .

  • I see. Take a look at this article:

    Order and Sort with MDX in SQL Server Analysis Services[/url]

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply