OLAP MDX 计算百分比显示第一个成员而不是平均值
我正在使用 MDX 将总和除以计数来计算 Analysis Services 2008 中的百分比
= IIF ([Measures].[STAT VALUE Count]=0,NULL,([Measures].[STAT VALUE]/100)/[Measures].[STAT VALUE Count])
我的颗粒处于每小时级别,并且本身就是一个百分比值
当浏览多维数据集并应用年-季度-月-日的时间维度层次结构时该显示是第一个成员。不是基础值的平均百分比
我如何更改我的 mdx 语句,以便我在浏览时看到的值是基础值的平均值。 在一年中,我想查看基础值的平均百分比,当我深入到季度时,我希望看到该季度的平均百分比,然后是当月的平均百分比,等等。
我承认在 MDX 方面我是一个相对初学者
I am calculating percentages in Analysis Services 2008 using MDX by dividing the sum by the count
= IIF ([Measures].[STAT VALUE Count]=0,NULL,([Measures].[STAT VALUE]/100)/[Measures].[STAT VALUE Count])
My grain is at the hourly level and is a percentage value itself
When browsing the cube and applying a Time dimension hierachy of year - quarter - month - day the values that display are the first member. Not the average percentage of the underlying values
How can i change my mdx statement so that the value i see when browsing is the average of the underlying values.
At year i want to see the average percentage of the underlying values, as i drill down to quarter i expect to see the average percentage for that quarter, then at the month etc etc.
I admit to being a relative beginner when it comes to MDX
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在多维数据集设计器中,检查 [Measures].[STAT VALUE] 的 AggregateFunction 是否设置为 Sum,并且 [Measures].[STAT VALUE Count] 的 AggregateFunction 设置为 Count。听起来其中一个被设置为 FirstNonEmpty。
In the cube designer, check that the AggregateFunction of [Measures].[STAT VALUE] is set to Sum, and the AggregateFunction of [Measures].[STAT VALUE Count] is set to Count. Sounds like one of them is set to FirstNonEmpty.