I've scoured several boards and even posted this on another with no response...but have not been able to find this exact
question or unable to get responses to somewhat similar questions to work because MDX is my achilles heel. I want to sum/count a value only if the brand attributes from the 2 dimensions below are equal.
[Placement].[Placement Brand]
A
B
C
[Metric].[Brand]
A
B
C
[Measures].[Value]
What I basically want to create is a calculated measure that looks like this, but I know the tuple in my sum() is what is causing
the problem and not sure how to fix it or limit it to that brand that satisfies the = in the logical expression.
IIF([Placement].[Placement Brand].MEMBERVALUE = [Metric].[Brand].MEMBERVALUE, SUM([Metric].[Brand],[MEASURES].VALUE), 0)
The other piece to this I want this to be able to work even if I'm not using the [Placement] dimension...every record in my
fact table has a placement key and metric key...is that even possible?
I have a CASE statement doing what I want, but then I have to hard code the brand values in it AND it requires the use of
the placement brand.
WHEN 'A' THEN SUM([Metric].[Brand].&[A], [Measures].[Value])
WHEN 'B' THEN SUM([Metric].[Brand].&[B], [Measures].[Value])
WHEN 'C' THEN SUM([Metric].[Brand].&[C], [Measures].[Value])
WHEN 'D' THEN SUM([Metric].[Brand].&[D], [Measures].[Value])
ELSE 0
END
Thanks for any help!