dbTalk Databases Forums  

Create a Sort Member

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


Discuss Create a Sort Member in the microsoft.public.sqlserver.olap forum.



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

Default Create a Sort Member - 07-27-2005 , 08:12 AM






This is my query

WITH
SET [Recent24Months] AS 'Tail(NonEmptyCrossJoin([FY
Period].[Month].Members), 24)'
MEMBER [Measures].[Month] AS 'Rank([FY Period].CurrentMember,
[Recent24Months]) - 23'

SELECT
{[Measures].[Month], [Measures].[Country SOM]} ON 0,
NONEMPTYCROSSJOIN({[Local Price Sector].[Local Price
Sector].Members}, [Recent24Months]) ON 1
FROM [Channel Cube Monthly]
WHERE [Country].[Country].[UK]

My Problem is that my [Local Price Sector].Members have the Names High,
Medium and Low and I want them displyed in that order in my SQL Report.

So, Basically I need to add another MEMBER Thats assigns a 1 to "High",
a 2 to "Medium" and a 3 to "Low". This way I can sort by this Measure

Can anyone give me advice on how to do this

Thanks in advance

Denver


Reply With Quote
  #2  
Old   
 
Posts: n/a

Default Re: Create a Sort Member - 07-27-2005 , 09:56 AM






WITH MEMBER [Measures].[SortMember] AS 'IIF([Local Price
Sector].CurrentMember.Properties("Caption") = "High", 1, IIF([Local Price
Sector].CurrentMember.Properties("Caption") = "Medium", 2, 3))

"Denver" <DenverKirrane (AT) gmail (DOT) com> wrote

Quote:
This is my query

WITH
SET [Recent24Months] AS 'Tail(NonEmptyCrossJoin([FY
Period].[Month].Members), 24)'
MEMBER [Measures].[Month] AS 'Rank([FY Period].CurrentMember,
[Recent24Months]) - 23'

SELECT
{[Measures].[Month], [Measures].[Country SOM]} ON 0,
NONEMPTYCROSSJOIN({[Local Price Sector].[Local Price
Sector].Members}, [Recent24Months]) ON 1
FROM [Channel Cube Monthly]
WHERE [Country].[Country].[UK]

My Problem is that my [Local Price Sector].Members have the Names High,
Medium and Low and I want them displyed in that order in my SQL Report.

So, Basically I need to add another MEMBER Thats assigns a 1 to "High",
a 2 to "Medium" and a 3 to "Low". This way I can sort by this Measure

Can anyone give me advice on how to do this

Thanks in advance

Denver




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

Default Re: Create a Sort Member - 07-27-2005 , 11:32 AM



Magnificent

Thanks

DK


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.