我有以下MDX查询,它在执行时成功返回该度量 -
SELECT
{[Measures].[Closed Quote OE Retail]} ON COLUMNS
FROM Sales
WHERE
(
[Posting Date].[Date YQMD].[Month].&[11]&[2012]
,[Work Provider].[Code].[LV]
,EXCEPT([Item].[by Item Category by Product Group].[Item Category], [Item].[by Item Category by Product Group].[Item Category].&[OEM])
,EXCEPT([Lost Sale Reason Code].[Code].[Code], [Lost Sale Reason Code].[Code].[All Lost Sale Reason Code].UNKNOWNMEMBER)
,EXCEPT([Lost Sale Reason Code].[by MI Type].[MI Type], { [Lost Sale Reason Code].[by MI Type].[MI Type].&[Not Justified] })
)
但是如果我在查询开头添加'DRILLTHROUGH',则返回以下错误 -
钻取失败,因为SELECT子句标识的坐标超出范围。
有人可以帮忙吗?
答案 0 :(得分:1)
如果在选择中有多个相同维度的成员(在本例中为切片器维度),MDX看起来不喜欢DRILLTHROUGH。看起来你也可以通过做一个子选择来欺骗它,但在依赖这个解决方案之前我会非常仔细地验证总数。
SELECT
{[Measures].[Closed Quote OE Retail]} ON COLUMNS
FROM
(
Select
(
[Posting Date].[Date YQMD].[Month].&[11]&[2012]
,[Work Provider].[Code].[LV]
,EXCEPT([Item].[by Item Category by Product Group].[Item Category],
[Item].[by Item Category by Product Group].[Item Category].&[OEM])
,EXCEPT([Lost Sale Reason Code].[Code].[Code],
[Lost Sale Reason Code].[Code].[All Lost Sale Reason Code].UNKNOWNMEMBER)
,EXCEPT([Lost Sale Reason Code].[by MI Type].[MI Type],
{ [Lost Sale Reason Code].[by MI Type].[MI Type].&[Not Justified] }
) on 0
From Sales)