SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


MDX Function to arrange months in correct order


MDX Function to arrange months in correct order

Author
Message
Guitar_player
Guitar_player
Right there with Babe
Right there with Babe (715 reputation)Right there with Babe (715 reputation)Right there with Babe (715 reputation)Right there with Babe (715 reputation)Right there with Babe (715 reputation)Right there with Babe (715 reputation)Right there with Babe (715 reputation)Right there with Babe (715 reputation)

Group: General Forum Members
Points: 715 Visits: 236
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 .
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)

Group: General Forum Members
Points: 59691 Visits: 13297
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?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Guitar_player
Guitar_player
Right there with Babe
Right there with Babe (715 reputation)Right there with Babe (715 reputation)Right there with Babe (715 reputation)Right there with Babe (715 reputation)Right there with Babe (715 reputation)Right there with Babe (715 reputation)Right there with Babe (715 reputation)Right there with Babe (715 reputation)

Group: General Forum Members
Points: 715 Visits: 236
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 .
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)

Group: General Forum Members
Points: 59691 Visits: 13297
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?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search