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

Stairway to MDX - STEP 3: The Order() Function Expand / Collapse
Author
Message
Posted Monday, February 14, 2011 10:37 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, October 9, 2014 6:21 AM
Points: 2, Visits: 66
Comments posted to this topic are about the item Stairway to MDX - STEP 3: The Order() Function
Post #1063692
Posted Thursday, March 3, 2011 1:54 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, February 16, 2013 3:03 PM
Points: 5, Visits: 56
Item 3 code mismatch:

{[Geography].[Geography].[State-Province].[Alabama].CHILDREN,
[Geography].[Geography].[State-Province].[Alabama].CHILDREN}

s/b Alabama, Mississippi
Post #1072904
Posted Monday, August 29, 2011 3:07 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, June 24, 2013 10:27 AM
Points: 13, Visits: 201
I'm going to leave this right here, even though I think it might just get answered in the next Stairway article.


In the example from STEP 3, how could I sort by Resellers Sales Amount DESC without the State_Province natural heirarchy breaking it up into what to me is two separate sorGed lists. I want to see Resellers Sales Amount in DESC order with out grouping by state.

Great article so far. It's giving me the kick start to MDX that I needed (I wanted to learn MDX but didn't know where to start).

EDIT: Just as I thought. BASC and BDESC will do this and are explained in the next Step

Jeff.
Post #1167213
Posted Tuesday, October 18, 2011 12:27 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, December 13, 2013 7:56 AM
Points: 939, Visits: 754
I get this error for the below code:
Query (11, 7) Parser: The syntax for 'ORDER' is incorrect.

-- SMDX003-004 Simple Use of Order() function across columns, 
-- sort descending(respecting hierarchies)


SELECT

NONEMPTY

ORDER(

{[Geography].[Geography].[State-Province].[Alabama].CHILDREN,

[Geography].[Geography].[State-Province].[Mississippi].CHILDREN},

[Measures].[Reseller Sales Amount], DESC

) ON AXIS(0),

{[Measures].[Reseller Sales Amount]} ON AXIS(1)

FROM

[Adventure Works]

What's wrong with the syntax?

TIA,
Rob



Post #1192405
Posted Thursday, October 9, 2014 3:41 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, October 20, 2014 8:00 AM
Points: 1, Visits: 34
hi all,

I just read the blog and still confused about the functionality of this order function.

According to the blog, when we add DESC keyword to the ORDER function, the data has to be sorted by fact value without any break in the natural hierarchy of dimensions, but why even the Alabama and Mississippi children are sorted ( I mean swapped).

I was expecting first the children of Alabama sorted by fact value DESC and then children of Mississippi sorted by fact value DESC.

Please help me in understanding this.

Thanks in Advance.
Post #1624154
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse