1.Description
现在我有两个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 [] []结果)
Result 1-click to see the image
查询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 [] []结果)
Result 2-click to see the image
2.Question
如何使用一个Mdx查询将这些数据组合在一起? 非常感谢。
答案 0 :(得分:0)
我认为您可以使用ALL
层次结构的PLGroup
成员进行组合 - 您别无选择,因为两者都需要具有相同的维度:
SELECT
NON EMPTY
{
[PLOwner].[PLOwner].Members
*[PLGroup].[PLGroup].[All] //<< or this may be [PLGroup].[All]
,
[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]
)