Hi,
I have en MDX challenge that I need some help with.
In my cube I have 3 dimensions: Business Unit (BU), Customer and Project
I have a calculated measure called [Budg Inv Hours %] = [Measures].[Budg Inv Hours] / [Measures].[Budg Capacity]
What I would like to archive is when using this calculated measure together with my Customer and Project dimensions then instead of making the calculation it should return 1 ( = 100%) if the [Measure].[Num Hours] return a value for the customer or project and else it should return no value ( NULL )
I could just create 2 new calculation like IIF(([Customer].[Customer], [Measures].[Num Hours]) = 0, NULL, 1), but I would like to just keep the one calculation (to keep my cube simple for my users) and either by changing this calculation or using a SCOPE get the result I want – if it is possible.
I have tried with the following SCOPE, but this also make the calculation return 100% when using it together with my Business Unit
dimension which is not what I am looking for:
SCOPE ([Customer].[Customer]); [Measures].[Budg Inv Hours %] = (IIF(([Customer].[Customer], [Measures].[Num Hours]) = 0, NULL, 1)); END SCOPE;
Also tried this:
SCOPE ([Customer].[Customer].MEMBERS, [Measures].[Budg Inv Hours %]); THIS = (IIF(([Customer].[Customer], [Measures].[Num Hours]) = 0, NULL, 1)); END SCOPE;
Can someone please guide me a little
Regards, Søren Damgaard Jensen Senior BI Consultant @ Norriq, DK