我需要使用两个层次结构下的维度字段,即MDX查询中另一个层次结构下的一个层次结构。
我的多维数据集中有以下层次结构/数据:

我需要在MDX查询中使用突出显示的Country字段。
请找到我试过的问题。
WITH MEMBER [Measures].[Expression1] AS [Geography].[Geography].[Country].currentmember.membervalue
select [Measures].[Expression1] on Columns from [Adventure Works]我正在获得以下错误:

但是,当我对一个层次结构使用相同的语法时,它可以工作。
请查找查询及其结果。

WITH MEMBER
[Measures].[Expression1] AS [Geography].[Country].currentmember.membervalue
select [Measures].[Expression1] on Columns from [Adventure Works]

我期望使用字段的两个层次结构名称获得相同的结果。
有人能引导我得到所需的价值吗?
发布于 2022-06-27 13:53:43
我认为你根本不需要WITH、currentmember或membervalue`。
这两个查询应该列出每个层次结构级别中的项.
select {[Geography].[Country].members} on Columns from [Adventure Works]
select {[Geography].[Geography].[Country].members} on Columns from [Adventure Works]https://stackoverflow.com/questions/71941811
复制相似问题