我想比较之前和当前的值,但我的MDX查询给出以下错误
"The CURRENTMEMBER function expects a hierarchy expression for the 1 argument."
我该如何解决这个问题?
我的MDX查询如下。请帮忙
with member [Measures].[Growth] as ([Date].[Calendar].[Month].CurrentMember,[Measures].[Internet Sales Amount])-([Date].[Calendar].[Month].CurrentMember.PrevMember,[Measures].[Internet Sales Amount])
select
{[Measures].[Internet Sales Amount],[Measures].[Growth] }
on columns,
{([Date].[Calendar].[Month].Members)}
on rows
FROM [Adventure Works]
答案 0 :(得分:4)
将您的会员声明更改为以下内容:
with member [Measures].[Growth] as ([Date].[Calendar].CurrentMember,[Measures].[Internet Sales Amount])-([Date].[Calendar].CurrentMember.PrevMember,[Measures].[Internet Sales Amount])
当前成员函数在一个层次结构中起作用。