如何在 MDX 的层次结构中找到每个组的总和
How to find sum of each group in Hierarchy in MDX
在下面的示例中,我想找到每个组的总和。有人可以更正我的 MDX 查询以获得所需的 GroupCount 列结果吗?
with member [GroupCount] as
aggregate([Department].[Department ID].currentmember.parent,
[Measures].[Pay Frequency])
select {[Department].[Group Name].[all].children*
[Department].[Department ID].[all].children
} on rows,
{[Measures].[Pay Frequency],[GroupCount]} on columns
from test
我从上述查询中得到的结果是:
但是我需要输出为:
是这样的吗?
with member [GroupCount] as
(
[Department].[Group Name].CURRENTMEMBER,
[Department].[Department ID].[All],
[Measures].[Pay Frequency]
)
select {[Department].[Group Name].[all].children*
[Department].[Department ID].[all].children
} on rows,
{[Measures].[Pay Frequency],[GroupCount]} on columns
from test;
在下面的示例中,我想找到每个组的总和。有人可以更正我的 MDX 查询以获得所需的 GroupCount 列结果吗?
with member [GroupCount] as
aggregate([Department].[Department ID].currentmember.parent,
[Measures].[Pay Frequency])
select {[Department].[Group Name].[all].children*
[Department].[Department ID].[all].children
} on rows,
{[Measures].[Pay Frequency],[GroupCount]} on columns
from test
我从上述查询中得到的结果是:
但是我需要输出为:
是这样的吗?
with member [GroupCount] as
(
[Department].[Group Name].CURRENTMEMBER,
[Department].[Department ID].[All],
[Measures].[Pay Frequency]
)
select {[Department].[Group Name].[all].children*
[Department].[Department ID].[all].children
} on rows,
{[Measures].[Pay Frequency],[GroupCount]} on columns
from test;