dbTalk Databases Forums  

Re: About Calculated Members

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


Discuss Re: About Calculated Members in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Francesco De Chirico
 
Posts: n/a

Default Re: About Calculated Members - 06-15-2004 , 05:22 PM






Hi Ricardo,
have you tried something like this and it didn't work?

Iif([MyDimension].CurrentMember.Level is [MyDimension].[MyLevel], 0, 1)





"Ricardo Antunez" <Ricardo Antunez (AT) discussions (DOT) microsoft.com> wrote in m
essage news:3AB956E1-DD7B-4277-9038-D76839891856 (AT) microsoft (DOT) com...
Quote:
Hi

I need to create a calculated member in which I need to have a value if a
level of one of the cube dimensions has a certain value, or zero otherwise

it may be like this

Iif( xxxxxxx = "CD", <<measure>>, 0 )

where xxxxxxx is the reference to the dimension level

I have tried some options, but didn't work

My question is if it is posible to do this and how

Thanks




Reply With Quote
  #2  
Old   
Francesco De Chirico
 
Posts: n/a

Default Re: About Calculated Members - 06-16-2004 , 11:33 AM






Hi Ricardo,
if I understand, you want to test if the actual member is the member you
want??
You can't reference to the CurrentMember of a level, but you can reference
to the CurrentMember of the dimension, so, you can use:

IIF( [Products].CurrentMember is [Products].[Type].&[Fruits], 1, 0)






Reply With Quote
  #3  
Old   
Ricardo Antunez
 
Posts: n/a

Default Re: About Calculated Members - 06-16-2004 , 03:15 PM



Hi Francesco, thank you for your time

I tried what you said, but it works only when I filter in that specific dimension or when I show that specific dimension, but the "All Products" returns zero

Thank you again
Ricardo

"Francesco De Chirico" wrote:

Quote:
Hi Ricardo,
if I understand, you want to test if the actual member is the member you
want??
You can't reference to the CurrentMember of a level, but you can reference
to the CurrentMember of the dimension, so, you can use:

IIF( [Products].CurrentMember is [Products].[Type].&[Fruits], 1, 0)







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.