Hi, This has been driving me nuts for the best part of an hour.. please help, my MDX is clearly far too rusty :/
I have a Fact table with say 10 records.., and a Dimension table with 2 options in it
I have a Fact Count Measure called 'Count', which results in the following:
The requirement is to show a count of everything that is NOT Option 1, and so originally i did this:
but that just results in:
which i am not especially happy with, not to mention it not supporting addition of any other members to the dimension in future
so, here lies my troubles.. what i think i really want to achieve is the following:
and to do this i have been messing around with EXCEPT() and IIF() and CASE etc... all to no avail
can someone please put me out of my misery and point me to how to achieve what i want, so that ultimately i can get to something:
I am thinking scope statement to null off where the member is "Option 1"? But I don't think you can do those on a calculated measure??
Thanks!
I have a Fact table with say 10 records.., and a Dimension table with 2 options in it
I have a Fact Count Measure called 'Count', which results in the following:
Code:
Count
Option 1 3
Option 2 7
---------------------------
Total 10
The requirement is to show a count of everything that is NOT Option 1, and so originally i did this:
Code:
create member currentcube.[measures].[myNewMeasure]
as
([measures].[count], [dim].[dim option].[Option 2])
,visible=1;
but that just results in:
Code:
Count myNewMeasure
Option 1 3 7
Option 2 7 7
---------------------------
Total 10 7
which i am not especially happy with, not to mention it not supporting addition of any other members to the dimension in future
so, here lies my troubles.. what i think i really want to achieve is the following:
Code:
myNewMeasure
Option 1
Option 2 7
---------------------------
Total 7
and to do this i have been messing around with EXCEPT() and IIF() and CASE etc... all to no avail
can someone please put me out of my misery and point me to how to achieve what i want, so that ultimately i can get to something:
Code:
myNewMeasure
Option 1
Option 2 7
Option 3 3
Option 4 8
---------------------------
Total 18
I am thinking scope statement to null off where the member is "Option 1"? But I don't think you can do those on a calculated measure??
Thanks!