dbTalk Databases Forums  

MDX conditional logic for first item in a hierarchy

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


Discuss MDX conditional logic for first item in a hierarchy in the microsoft.public.sqlserver.olap forum.



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

Default MDX conditional logic for first item in a hierarchy - 01-20-2004 , 01:51 PM






Hi all,

I believe this is a fairly easy question. I am trying to do a relative percent of parent calculation. The math works, except for at the all level where I would like the value to be 1 (or 100%). I've tried testing for item(0) on the currentmember but that didn't work. Any help would be appreciated. Below is the current MDX statement. Thanks in advance,

Mark

IIF(([Measures].[Current Balance],[Cltv Tier].currentmember.parent) = 0,NULL,[Measures].[Current Balance]/([Measures].[Current Balance],[Cltv Tier].currentmember.parent))

Reply With Quote
  #2  
Old   
Tom Chester
 
Posts: n/a

Default Re: MDX conditional logic for first item in a hierarchy - 01-20-2004 , 03:14 PM






Something like this:

IIF( MyDim.CurrentMember IS MyDim.DefaultMember,
NULL,
<formula here> )

(Might you be the Mark Frank with whom I'm acquainted?)

public @ the domain below
www.tomchester.net

"Mark Frank" <mark.a.frank (AT) wellsfargo (DOT) com> wrote

Quote:
Hi all,

I believe this is a fairly easy question. I am trying to do a relative
percent of parent calculation. The math works, except for at the all level
where I would like the value to be 1 (or 100%). I've tried testing for
item(0) on the currentmember but that didn't work. Any help would be
appreciated. Below is the current MDX statement. Thanks in advance,
Quote:
Mark

IIF(([Measures].[Current Balance],[Cltv Tier].currentmember.parent) =
0,NULL,[Measures].[Current Balance]/([Measures].[Current Balance],[Cltv
Tier].currentmember.parent))




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.