Let's supose a simple scenario: a fact table F with two dimensions D1 and D2.
F D1 D2
10 A B
15 B C
In this scenario I define a new calculated member C1 using an expression close than this one:
with member measures.C1 as
sum(
descendants( [D1].[Ds].currentMember, , leaves ),
[myMeasure]
)
select
measures.C1 on 0,
[D2].[Ds].AllMembers on 1
from [MyCube]
How can I modify C1 to incorpore all time all D2 members in expression?
I get this results:
C1 D2
10 B
15 C
and I'm looking for this:
C1 D2
35 B
35 C
(of course this is a simplification of real problem, please, don't try to fix C1 expression, only add code to get expected results, I have tried with:
sum(
{ descendants( [D1].[Ds].currentMember, , leaves ),
[D2].[Ds].AllMembers },
[myMeasure]
unsuccesfully)
regards.