问题
Category {A,B,C}
Value
Currently I can get:
Category Value
-------- -----
A 100
B 200
C 300
What I'd like to get is:
Category Value
-------- -----
A 100
B 200
C 300
D 500
Where D is the value of B + C.
回答1:
Wow, this was actually incredibly easy...
with member [Category].[Name].[D] as
[Category].[Name].[B] + [Category].[Name].[C]
select
{[Measures].[Value]} on columns,
[Category].[Name].allmembers on rows
from [Cube]
Result:
Category Value
-------- -----
A 100
B 200
C 300
D 500
来源:https://stackoverflow.com/questions/3697585/mdx-creating-a-dynamic-grouping-member