MDX DRILLTHROUGH Fails but select can be successfully executed

两盒软妹~` 提交于 2019-12-12 14:18:59

问题


I have the following MDX query which succesfully returns the measure when executed -

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] })
)

But if I add 'DRILLTHROUGH' to the start of the query the following error is returned -

Drillthrough failed because the coordinate identified by the SELECT clause is out of range.

Can anyone help?


回答1:


Looks like MDX doesn't like DRILLTHROUGH when you have multiple members of the same dimension in the Select - in this case, on your slicer dimension. It also appears you can trick it by doing a sub-select, but I would verify the totals pretty carefully before relying on this solution.

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)


来源:https://stackoverflow.com/questions/13194942/mdx-drillthrough-fails-but-select-can-be-successfully-executed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!