2012-11-02 65 views
3

我有以下MDX查詢執行時成功地返回措施 -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] }) 
) 

但是,如果我添加「鑽取」來查詢的開始跟隨誤差返回 -

鑽取失敗,因爲座標由SELECT子句標識超出範圍。

任何人都可以幫忙嗎?

回答

1

看起來像MDX不喜歡DRILLTHROUGH,當你在Select中有多個相同尺寸的成員時 - 在這種情況下,在你的切片器尺寸上。它似乎也可以通過執行子選擇來欺騙它,但在依靠此解決方案之前,我會仔細驗證總計。

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)