[英]How to Aggregate percentages in SSRS
I want to add a total field to a table with percentages. 我想将总计字段添加到带有百分比的表中。
The AVG()
Function within SSRS doesn't work for me because of the following reasons. 由于以下原因,SSRS内的
AVG()
函数对我不起作用。 ( The measures are in percentages) (度量单位为百分比)
_______________________________
|Group 1| Measure 1| Total 1 |
|_______|__________|___________|
|Group 2| Measure 2| |
| | Measure 3|Total 2 |
|_______|__________|___________|
|Total |__________|Grand Total|
If Measure 1 is 100 %
如果度量1为100%
And Measure 2 is 0%措施2为0%
And measure 3 is 100%而措施3是100%
Total 1 will be 100%
总数1将为100%
Total 2 will be 50 %总计2将为50%
Grand Total will be 75% (100 +50 /2)总计将为75%(100 +50 / 2)
While it should be 66% (100 + 100 + 0 /3)
虽然应该是66%(100 + 100 + 0/3)
The percentages are precalculated. 百分比是预先计算的。
Instead of calculating the average of the Totals , calculate the grand total of all Measures . 代替计算总计的平均值,而是计算所有度量的总计 。 So you should be able to use the
AVG()
function on all the measures of your datasource. 因此,您应该能够在数据源的所有度量上使用
AVG()
函数。
=AVG(Fields!Measure.Value)
This will basically calculate the total sum of all measure values and divide it by the amount of records that are in your datasource. 基本上,这将计算所有度量值的总和,并将其除以数据源中的记录量。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.