一、说明
现在我有两个 mdx 查询,唯一的区别是 ON ROWS 设置。这是每个查询及其结果。
查询 1:
SELECT
NON EMPTY
{
[PLOwner].[PLOwner].Members
}
ON ROWS
,
NON EMPTY
Crossjoin(
{
[InfoType].[InfoType].[Risk_RecoveryJTDTable],
[InfoType].[InfoType].[Equivalent_Notional],
[InfoType].[InfoType].[Risk_SPC],
[InfoType].[InfoType].[Risk_PSM],
[InfoType].[InfoType].[Risk_PV10],
[InfoType].[InfoType].[Notional],
[InfoType].[InfoType].[Notional_IMM],
[InfoType].[InfoType].[PnL],
[InfoType].[InfoType].[TomorrowPnL],
[InfoType].[InfoType].[RollPnL],
[InfoType].[InfoType].[RollDownPnL],
[InfoType].[InfoType].[Risk_JTD],
[InfoType].[InfoType].[Risk_Raw_KC],
[InfoType].[InfoType].[Risk_RR],
[InfoType].[InfoType].[FundingPnLWCOF],
[InfoType].[InfoType].[FundingPnLRR],
[InfoType].[InfoType].[FundingPnLSHW],
[InfoType].[InfoType].[FundingPnLBox],
[InfoType].[InfoType].[FundingPnLInterest]
}
,
{
DrillDownLevel([Category].[ALL].[AllMember])
}
,
{
DrillDownLevel([Label1].[ALL].[AllMember])
}
,
{
DrillDownLevel([IsError].[ALL].[AllMember])
}
)
ON COLUMNS
FROM
[UnityRiskCube]
WHERE
(
[Measures].[Risk.SUM],
[BusinessGroup].[BusinessGroup].[AeJ Flow Credit],
[Context].[ContextId].[official:Live]
)
结果 1:(我使用 Excel 显示来自 Pivot 的 String[][] 结果)
查询 2:
SELECT
NON EMPTY
Crossjoin(
{
[PLOwner].[PLOwner].Members
}
,
{
[PLGroup].[PLGroup].Members
}
)
ON ROWS
,
NON EMPTY
Crossjoin(
{
[InfoType].[InfoType].[Risk_RecoveryJTDTable],
[InfoType].[InfoType].[Equivalent_Notional],
[InfoType].[InfoType].[Risk_SPC],
[InfoType].[InfoType].[Risk_PSM],
[InfoType].[InfoType].[Risk_PV10],
[InfoType].[InfoType].[Notional],
[InfoType].[InfoType].[Notional_IMM],
[InfoType].[InfoType].[PnL],
[InfoType].[InfoType].[TomorrowPnL],
[InfoType].[InfoType].[RollPnL],
[InfoType].[InfoType].[RollDownPnL],
[InfoType].[InfoType].[Risk_JTD],
[InfoType].[InfoType].[Risk_Raw_KC],
[InfoType].[InfoType].[Risk_RR],
[InfoType].[InfoType].[FundingPnLWCOF],
[InfoType].[InfoType].[FundingPnLRR],
[InfoType].[InfoType].[FundingPnLSHW],
[InfoType].[InfoType].[FundingPnLBox],
[InfoType].[InfoType].[FundingPnLInterest]
}
,
{
DrillDownLevel([Category].[ALL].[AllMember])
}
,
{
DrillDownLevel([Label1].[ALL].[AllMember])
}
,
{
DrillDownLevel([IsError].[ALL].[AllMember])
}
)
ON COLUMNS
FROM
[UnityRiskCube]
WHERE
(
[Measures].[Risk.SUM],
[BusinessGroup].[BusinessGroup].[AeJ Flow Credit],
[Context].[ContextId].[official:Live]
)
结果 2:(我使用 Excel 显示来自 Pivot 的 String[][] 结果)
2.问题
如何使用一个 Mdx 查询将这些数据汇总在一起?非常感谢。