3

我有以下 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 子句标识的坐标超出范围。

任何人都可以帮忙吗?

4

1 回答 1

1

当您在 Select 中有多个相同维度的成员时,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)
于 2012-11-02T21:16:07.977 回答