SSAS - 移动年度总计
环境:SQL-Server-2005、SSAS 2005
我使用以下公式创建移动年度总计
SUM ({[Time].CurrentMember.Lag(3):[Time].CurrentMember}, [Measures]。 [TRx Quantity])
同一列[Measures].[Trx Quantity]
用于其他计算,并且工作正常。然而,这个出现了 #Value!
来指示某种错误。有人能在这里指出正确的方向吗?
Environment: SQL-Server-2005, SSAS 2005
I am using the following formula to create a Moving Annual Total
SUM ({[Time].CurrentMember.Lag(3):[Time].CurrentMember}, [Measures].[TRx Quantity])
The same column [Measures].[Trx Quantity]
is used in other calculations and it works fine. This one, however, comes up with #Value!
to indicate some kind of an error. Can anyone point me in the proper direction here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是 SSAS 2005/2008 吗?
如果是其中任何一个并且您在 Management Studio 中运行它,您可以将鼠标悬停在 #Value 上并获取错误的详细信息。
但据猜测,这很可能是因为 .CurrentMember 需要在层次结构上调用,而
[Time]
是维度引用。它应该引用诸如[Time].[Calendar].CurrentMember
或[Time].[Quarter].CurrentMember
之类的层次结构之一Is this SSAS 2005/2008?
If it is either of these and you are running this in Management Studio you can hover over the #Value and get the details of the error.
But at a guess it is most likely because .CurrentMember needs to be called on a hierarchy and
[Time]
is a dimension reference. It should refer to one of the hierarchies like[Time].[Calendar].CurrentMember
or maybe[Time].[Quarter].CurrentMember
事实证明,我错过了 MONTH
SUM ({[Time].[Month].CurrentMember.Lag(3):[Time].[Month].CurrentMember}, [Measures].[TRx Quantity])
It turned out to be that I was missing the MONTH
SUM ({[Time].[Month].CurrentMember.Lag(3):[Time].[Month].CurrentMember}, [Measures].[TRx Quantity])