开发者

Why AVG function perform the SUM?

开发者 https://www.devze.com 2023-03-11 04:10 出处:网络
I would to execute a query with a calculated member which returns the AVG (of th开发者_StackOverflowe measure) of the Coil belonging to a particular LINESPEED.

I would to execute a query with a calculated member which returns the AVG (of th开发者_StackOverflowe measure) of the Coil belonging to a particular LINESPEED.

The query is:

With
Member [Measures].[Avg1] As
AVG(
([LINESPEED].currentmember,
[GRUPPO].[Coil].currentmember)
,
[Measures].[KPI1]
)    
SELECT [Measures].[Avg1] on 0,
non empty {[LINESPEED].children} On 1 
from[HDGL]

But the AVG function compute exactly the sum of the KPIs of the coil related to a particular LINESPEED!!

Why?


Your formula is using a single tuple, so AVG() is equivalent to SUM() :

AVG( ([LINESPEED].currentmember, [GRUPPO].[Coil].currentmember), ...)    
0

精彩评论

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