我该如何解决这个 MDX 问题?

发布于 2024-12-06 21:01:23 字数 558 浏览 1 评论 0原文

我想比较以前的值和当前的值,但我的 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]

I want to be comparing the previous and current values, but my MDX query is giving the following error

"The CURRENTMEMBER function expects a hierarchy expression for the 1 argument."  

How can I solve this problem?

My MDX query is below. please help

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]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我不会写诗 2024-12-13 21:01:23

将您的成员语句更改为以下内容:

with member [Measures].[Growth] as ([Date].[Calendar].CurrentMember,[Measures].[Internet   Sales Amount])-([Date].[Calendar].CurrentMember.PrevMember,[Measures].[Internet Sales Amount])

currentmember 函数在层次结构中工作。

Change your member statement to the following:

with member [Measures].[Growth] as ([Date].[Calendar].CurrentMember,[Measures].[Internet   Sales Amount])-([Date].[Calendar].CurrentMember.PrevMember,[Measures].[Internet Sales Amount])

The currentmember function works off of a hiearchy.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文