SSRS中的除法运算

问题描述

我正在处理ssrs报告,他们希望查看以下结果 [样本输出] [1] 那是报告中的最后一行,我想通过将上图中的558除以388得到%的值。

这是我在ssrs中设计的 [报告设计] [2] 突出显示一个包含以下公式:

=( Sum(Fields!Male.Value + Fields!Female.Value ) / (Sum(Fields!Male.Value,"GradeCode" ) + Sum(Fields!Female.Value,"GradeCode" ) ) )
but I'm getting 100% instead of 70%.
Below are the columns I have GradeCode,Male count,female count,race.
Can someone please suggest me the correct formula?
this is the expected result [enter image description here][3]
This is my design [enter image description here][4]
This is my result [enter image description here][5]
I highlighted the last row in that I should get the result of 18/582 instead it is giving 100% (in the pic I just displayed value in % and the denominator is not present)



  [1]: https://i.stack.imgur.com/jB9Lz.png
  [2]: https://i.stack.imgur.com/iMc6f.png

解决方法

尝试在组范围内使用数据集名称。

例如

=Sum((Fields!Male.Value + Fields!Female.Value),"Federal_Race_Group") / (Sum(Fields!Male.Value,"DataSetName" ) + Sum(Fields!Female.Value,"DataSetName" ) )

检查我的报告预览。我已经使用了样本数据集。

Report Design

Report Preview