dbTalk Databases Forums  

Problem with MDX Nested Ranking

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Problem with MDX Nested Ranking in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rodrigo
 
Posts: n/a

Default Problem with MDX Nested Ranking - 03-08-2005 , 10:27 AM






Hello Everybody:

Somebody know how I can create a nested ranking from a analysis services
cube, for two intermediate levels of one dimension, using MDX?.. i mean, sort
a intermediate level using a measure and then sort a child level using the
same measure... but that the parent level do not be sorted in turn by his
parent

Something like:

Dimension
Location: Country->Region->City
Measures: Sales Amount

I need get the next results:
Location Sales Amount
Region1 25
City1 20
City2 3
City3 2
Region2 10
City4 6
City5 4
Region 3 5
City6 3
City7 2

I need this result independently of the "Sales Amount" values in the Country
level's order.

Thanks in advance

Rodrigo

Reply With Quote
  #2  
Old   
Ohjoo Kwon
 
Posts: n/a

Default Re: Problem with MDX Nested Ranking - 03-08-2005 , 10:49 AM






SELECT
{[Sales Amount]} ON 0,
Generate(Order(Location.Region.Members, [Sales Amount], BDESC),
{Location.CurrentMember, Order(Location.CurrentMember.Children,
[Sales Amount], DESC)}
) ON 1
FROM Sales

Ohjoo Kwon


"Rodrigo" <Rodrigo (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hello Everybody:

Somebody know how I can create a nested ranking from a analysis services
cube, for two intermediate levels of one dimension, using MDX?.. i mean,
sort
a intermediate level using a measure and then sort a child level using the
same measure... but that the parent level do not be sorted in turn by his
parent

Something like:

Dimension
Location: Country->Region->City
Measures: Sales Amount

I need get the next results:
Location Sales Amount
Region1 25
City1 20
City2 3
City3 2
Region2 10
City4 6
City5 4
Region 3 5
City6 3
City7 2

I need this result independently of the "Sales Amount" values in the
Country
level's order.

Thanks in advance

Rodrigo



Reply With Quote
  #3  
Old   
Rodrigo
 
Posts: n/a

Default Re: Problem with MDX Nested Ranking - 03-09-2005 , 09:29 AM



Thanks Ohjoo!!! Work fine!!

Regards
Rodrigo

"Ohjoo Kwon" wrote:

Quote:
SELECT
{[Sales Amount]} ON 0,
Generate(Order(Location.Region.Members, [Sales Amount], BDESC),
{Location.CurrentMember, Order(Location.CurrentMember.Children,
[Sales Amount], DESC)}
) ON 1
FROM Sales

Ohjoo Kwon


"Rodrigo" <Rodrigo (AT) discussions (DOT) microsoft.com> wrote in message
news:5909241E-015E-4336-BF2A-93C98A020A4B (AT) microsoft (DOT) com...
Hello Everybody:

Somebody know how I can create a nested ranking from a analysis services
cube, for two intermediate levels of one dimension, using MDX?.. i mean,
sort
a intermediate level using a measure and then sort a child level using the
same measure... but that the parent level do not be sorted in turn by his
parent

Something like:

Dimension
Location: Country->Region->City
Measures: Sales Amount

I need get the next results:
Location Sales Amount
Region1 25
City1 20
City2 3
City3 2
Region2 10
City4 6
City5 4
Region 3 5
City6 3
City7 2

I need this result independently of the "Sales Amount" values in the
Country
level's order.

Thanks in advance

Rodrigo




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.