Wednesday, November 19, 2014

substruction in subtotals

Hi recai,


According to your description, you have a matrix in the report, there are two column groups group A and group B, you want to calculate the difference between total of group A and group B. If that is the case, we can achieve the goal by using sum and iif function in expression. For detail information, please refer to the following steps:



  1. Right-click handle of the last column, click Insert Column, then click Outside Group – Right to add a column outside the group.

  2. Right-click handle of the last column, click Expression.

  3. In the Expression text box, type the expression like below:



=Sum(iif(Fields!column.Value="B",Fields!colValues.value,0)-Sum(iif(Fields!column.Value="A",Fields!colValues.value,0)



We can also use custom code to calculate the difference, here are two relevant threads you can refer to:

http://ift.tt/1uUd4HH


http://ift.tt/1x1SMJ4




If you have any more questions, please feel free to ask.


Thanks,

Wendy Fu


No comments:

Post a Comment