dbTalk Databases Forums  

Current Measure checking

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


Discuss Current Measure checking in the microsoft.public.sqlserver.olap forum.



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

Default Current Measure checking - 09-23-2004 , 06:28 PM






Hi all

I have a calculated member kind of YTD member with parent dimension
[current period].

All my formula YTD, AVG or SUM are working okay for all measures.
However if I want a specific formula for one particular Measure say
[Km], I find that it never find this measure name. Did I do anything
wrong ? Thanks in advance.

Iif (([Measures].Currentmember is [Km]),
-- Never come to here
Iif([DM Billing Month].currentmember.level.name = "Year",

SUM(Descendants([DM Billing Month].currentmember,[month], self),
([DM Current Period].&[1], [Measures].CurrentMember)),

Iif([DM Billing Month].currentmember.level.name = "Qtr",

SUM(Descendants([DM Billing Month].parent,[month], self), ([DM
Current Period].&[1], [Measures].CurrentMember)),

SUM(Descendants([DM Billing Month].parent.parent,[month], self),
([DM Current Period].&[1], [Measures].CurrentMember))
)
),
-- AVERAGE ON ALL measures
Iif([DM Billing Month].currentmember.level.name = "Year",

AVG(Descendants([DM Billing Month].currentmember,[month], self),
([DM Current Period].&[1], [Measures].CurrentMember)),

Iif([DM Billing Month].currentmember.level.name = "Qtr",

AVG(Descendants([DM Billing Month].parent,[month], self), ([DM
Current Period].&[1], [Measures].CurrentMember)),

AVG(Descendants([DM Billing Month].parent.parent,[month], self),
([DM Current Period].&[1], [Measures].CurrentMember))
)
)
)

Reply With Quote
  #2  
Old   
Norman Leung
 
Posts: n/a

Default Re: Current Measure checking - 09-24-2004 , 05:22 PM






Hi all

I found a fix on following now. The [Km] is a calculated member so it
is not found (don't know why or is it documented.)

After I changed to its source measures [Pre Km], everything works to
as it is expected.

normanl (AT) interlog (DOT) com (Norman Leung) wrote in message news:<3d8f97f8.0409231528.4199edb1 (AT) posting (DOT) google.com>...
Quote:
Hi all

I have a calculated member kind of YTD member with parent dimension
[current period].

All my formula YTD, AVG or SUM are working okay for all measures.
However if I want a specific formula for one particular Measure say
[Km], I find that it never find this measure name. Did I do anything
wrong ? Thanks in advance.

Iif (([Measures].Currentmember is [Km]),
-- Never come to here
Iif([DM Billing Month].currentmember.level.name = "Year",

SUM(Descendants([DM Billing Month].currentmember,[month], self),
([DM Current Period].&[1], [Measures].CurrentMember)),

Iif([DM Billing Month].currentmember.level.name = "Qtr",

SUM(Descendants([DM Billing Month].parent,[month], self), ([DM
Current Period].&[1], [Measures].CurrentMember)),

SUM(Descendants([DM Billing Month].parent.parent,[month], self),
([DM Current Period].&[1], [Measures].CurrentMember))
)
),
-- AVERAGE ON ALL measures
Iif([DM Billing Month].currentmember.level.name = "Year",

AVG(Descendants([DM Billing Month].currentmember,[month], self),
([DM Current Period].&[1], [Measures].CurrentMember)),

Iif([DM Billing Month].currentmember.level.name = "Qtr",

AVG(Descendants([DM Billing Month].parent,[month], self), ([DM
Current Period].&[1], [Measures].CurrentMember)),

AVG(Descendants([DM Billing Month].parent.parent,[month], self),
([DM Current Period].&[1], [Measures].CurrentMember))
)
)
)

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.