在以下MDX查询中
SELECT
{
[EffectiveDate].[Period].[All].CHILDREN,
[EffectiveDate].[Period].[All]
} ON COLUMNS,
NON EMPTY {
[Account].[Hierarchy].[Account Type].&[Assets].CHILDREN,
[Account].[Hierarchy].[Account Type].&[Assets],
[Account].[Hierarchy].[Account Type].&[Liabilities].CHILDREN,
[Account].[Hierarchy].[Account Type].&[Liabilities],
[Account].[Hierarchy].[Account Type].&[Equity].CHILDREN,
[Account].[Hierarchy].[Account Type].&[Equity],
[Account].[Hierarchy].[Account Type].&[Revenue].CHILDREN,
[Account].[Hierarchy].[Account Type].&[Revenue],
[Account].[Hierarchy].[Account Type].&[Expenses].CHILDREN,
[Account].[Hierarchy].[Account Type].&[Expenses]
} ON ROWS
FROM [JEMDA]
WHERE CrossJoin(
{
[Measures].[Amount]
},
{
[Source].[Source].[[Blank]]]
},
{
[EffectiveDate].[Period].&[5-Dec],
[EffectiveDate].[Period].&[5-Nov],
[EffectiveDate].[Period].&[5-Oct],
[EffectiveDate].[Period].&[6-Jan]
})
报告错误:
“期间”层次结构已显示在Axis0轴中。
你能告诉我如何解决这个问题吗?谢谢!
答案 0 :(得分:15)
您不能在切片器上的列AND上使用Period层次结构。
您可以像这样重写您的查询:
SELECT
{
[EffectiveDate].[Period].[All].CHILDREN,
[EffectiveDate].[Period].[All]
} ON COLUMNS,
NON EMPTY
{
[Account].[Hierarchy].[Account Type].&[Assets].CHILDREN,
[Account].[Hierarchy].[Account Type].&[Assets],
[Account].[Hierarchy].[Account Type].&[Liabilities].CHILDREN,
[Account].[Hierarchy].[Account Type].&[Liabilities],
[Account].[Hierarchy].[Account Type].&[Equity].CHILDREN,
[Account].[Hierarchy].[Account Type].&[Equity],
[Account].[Hierarchy].[Account Type].&[Revenue].CHILDREN,
[Account].[Hierarchy].[Account Type].&[Revenue],
[Account].[Hierarchy].[Account Type].&[Expenses].CHILDREN,
[Account].[Hierarchy].[Account Type].&[Expenses]
} ON ROWS
FROM
(
SELECT {
[EffectiveDate].[Period].&[5-Dec],
[EffectiveDate].[Period].&[5-Nov],
[EffectiveDate].[Period].&[5-Oct],
[EffectiveDate].[Period].&[6-Jan]
} ON 0
FROM [JEMDA]
)
WHERE
(
[Measures].[Amount],
[Source].[Source].[[Blank]]
)