gpt4 book ai didi

sql-server - MDX DRILLTHROUGH 失败但选择可以成功执行

转载 作者:行者123 更新时间:2023-12-03 09:35:43 34 4
gpt4 key购买 nike

我有以下 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”,则会返回以下错误 -

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

有人能帮忙吗?

最佳答案

当您在 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)

关于sql-server - MDX DRILLTHROUGH 失败但选择可以成功执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13194942/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com