eo
MIS
- Apr 3, 2003
- 809
I need to create some MDX that will show a value based on which dimension member is selected. I know this is possible using a SCOPE statement, but am thinking that an IIF statement is more appropriate as it must be embedded into a larger SCOPE statement.
Not going into too much detail as you might not understand the context of the problem I am trying to resolve, and am still only in the proof of concept stage, so basically the IIF statement must deliver either a 1 or 0 based on which dimension hierarchy member is selected.
I tried this above, but it does not work, and I am thinking the issue is with the logical expression part. In plain English, I am trying to say that if the user selects the dimension member [Currency Conversion Type].[CurrConvType].[Rate Type].&[Lloyds Business Planning], then the value returned must be 1, if they select anything else, then it must be 0. I am using "is true" for this as I do not know how else to do this??
Any suggestions??
EO
Hertfordshire, England
Not going into too much detail as you might not understand the context of the problem I am trying to resolve, and am still only in the proof of concept stage, so basically the IIF statement must deliver either a 1 or 0 based on which dimension hierarchy member is selected.
Code:
CREATE MEMBER CURRENTCUBE.[MEASURES].[LPRate_test]
AS
IIF([Currency Conversion Type].[CurrConvType].[Rate Type].&[Lloyds Business Planning] is true,
1, 0)
, FORMAT_STRING = "#,#", VISIBLE = 1;
I tried this above, but it does not work, and I am thinking the issue is with the logical expression part. In plain English, I am trying to say that if the user selects the dimension member [Currency Conversion Type].[CurrConvType].[Rate Type].&[Lloyds Business Planning], then the value returned must be 1, if they select anything else, then it must be 0. I am using "is true" for this as I do not know how else to do this??
Any suggestions??
EO
Hertfordshire, England