gpt4 book ai didi

ssas - MDX 错误 : referring the calculated measure (using with member) within a subcube return an error

转载 作者:行者123 更新时间:2023-12-02 03:39:47 25 4
gpt4 key购买 nike

我是 MDX 的新手。你能帮我理清这个概念吗?感谢您的帮助。

我有下面的 MDX 查询,它执行得很好。

with member [measures].[perc] as
([Dim Customer].[Customer ID].currentmember,[Measures].[Amount])

select
[measures].[perc] on 0,
[Dim Customer].[Customer ID].children on 1
from [Analysis DW]

但是,当我尝试引用 [measure].[perc] 时,我收到一条错误消息,提示 “当字符串 [measures].[perc ], 被解析。"

请在下面找到错误的 mdx 脚本以供引用-

with 
member [measures].[perc] as
([Dim Customer].[Customer ID].currentmember,[Measures].[Amount])

select [measures].[perc] on 0
from
(
select
[measures].[perc] on 0,
[Dim Customer].[Customer ID].children on 1
from [Analysis DW]
)

最佳答案

来晚了很多,但认为这对有类似问题的人有帮助。

您的 MDX 查询失败,因为计算的度量超出了子多维数据集的上下文。您在 MDX 选择代码段上方声明 [Measures].[perc]。因此,根据设计,它对跟随它的选择可见但是 Select 内的子立方体不可见。因此,以下代码对 SSAS 引擎毫无意义。

   select
[measures].[perc] on 0, //Compiler is like .... WHAT THE %@#^ ??
[Dim Customer].[Customer ID].children on 1
from [Analysis DW]

写的一样好

   select
[measures].[RandomGarbageName] on 0,
[Dim Customer].[Customer ID].children on 1
from [Analysis DW]

希望这对您有所帮助。

关于ssas - MDX 错误 : referring the calculated measure (using with member) within a subcube return an error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20783288/

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