开发者

OLAP MDX calculating percentages displays first member instead of average

开发者 https://www.devze.com 2022-12-22 07:52 出处:网络
I am calculati开发者_JS百科ng percentages in Analysis Services 2008 using MDX by dividing the sum by the count

I am calculati开发者_JS百科ng 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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消