用属性值计算平均值 [英] Calculate average with attribute value

查看:112
本文介绍了用属性值计算平均值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一个度量值来返回下面属性的平均值。



示例: 


Idade do Certificado Pessoa


10


20


30



结果我希望是:20



我能想到的唯一解决方案是创建一个包含此计算的单独表并插入一个新措施组进入立方体。有人可以帮帮我吗?


解决方案

这可以通过MDX来完成,比如

平均

[DIM CERTIFICADO]。[Idade do Certificado Pessoa]。[Idade do Certificado Pessoa]
,[DIM CERTIFICADO]。[Idade do Certificado Pessoa] .CurrentMember.MemberValue

为此,值必须是数字,而不是字符串。


I need to create a measure that will return the average of the attribute below.

Example: 

Idade do Certificado Pessoa

10

20

30

The result that I hope is: 20

The only solution I could think of is to create a separate table that will contain this calculation and insert a new measure group into the cube. Can someone help me?

解决方案

This can be done with MDX, something like

    Avg
    (
      [DIM CERTIFICADO].[Idade do Certificado Pessoa].[Idade do Certificado Pessoa]
     ,[DIM CERTIFICADO].[Idade do Certificado Pessoa].CurrentMember.MemberValue
    ) 

For this to work, the value has to be numeric, not string.


这篇关于用属性值计算平均值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆