sql-server - 错误: The MDX function CURRENTMEMBER failed because the coordinate for the attribute contains a set

标签 sql-server reporting-services ssas mdx

如何处理此错误:

The MDX function CURRENTMEMBER failed because the coordinate for the attribute contains a set.

执行 MDX 查询时:

SELECT (
 { [Measures].[Amount]} 
 )ON COLUMNS,
 (
[OrganizationUnits].[Description].[Description].MEMBERS,
[OrganizationUnits].[IsCURRENT].[IsCURRENT]
) ON ROWS
FROM

(SELECT  [OrganizationUnits].[Description] ON 0
FROM
[CubeName]
WHERE( 

{[OrganizationUnits].[Description].&[Unit1],[OrganizationUnits].[Description].&[Unit2]}
)
)

谢谢!!

最佳答案

您的多维数据集中似乎有一个使用 .CurrentMember 的计算成员,可能类似于 [OrganizationUnits].[Description].CurrentMember。这会导致在 where 条件中具有多个成员的集合出现错误,就像您使用的那样

WHERE( 

{[OrganizationUnits].[Description].&[Unit1],[OrganizationUnits].[Description].&[Unit2]}
)

下面的文章 - 以及它在顶部引用的文章 - 包含一些如何解决此类问题的建议:https://web.archive.org/web/20170514194410/http://sqlblog.com/blogs/mosha/archive/2007/01/13/multiselect-friendly-mdx-for-calculations-looking-at-current-coordinate.aspx

关于sql-server - 错误: The MDX function CURRENTMEMBER failed because the coordinate for the attribute contains a set,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21777904/

相关文章:

sql - 将 Excel 导入 SQL 时保留前导零

reporting-services - 在横向模式下打印报告

reporting-services - 如何根据SSRS中的参数使tablix可见

excel - 在 Mac 上通过 Excel 访问 MS Analysis Services Cube?

sql-server - 我什么时候需要处理立方体?

sql - 在 SQL Server 中,ASC 关键字的用途是什么,因为 ASC 是默认值?

sql-server - 根据组条件将名称分配给其他行

sql - 'dbo' 用户不应用于正常的服务操作

mysql - SSS Report Builder 3.0 查询参数 - 报表预览

ssas - 在 MDX 中实现 IN/LIKE