0
votes

I have one ssrs report having matrix table which looks like this

 YEAR    A1  B1 Total percentage
 2012    23  11  34    
 2013    12  12  24
 2014    32  43  75

here i need to find percentage using below formula in ssrs expression

(Total of current year-Total of previous year)/(Total of previous year)*100

[for ex take 2012 - (Total for 2012-Total for 2011)/(Total for 2011)*100

2

2 Answers

0
votes

The easiest way is to add a column to your data set that had the previous year total. Then you would right click the Percentage field and create an expression like the one above you want to calculate.

Expression Examples

-1
votes

One way easy way would be to use the Function previous, in SSRS this function returns the previous row item. Calculating the percentage would then be something like:

((Previous(Count(Fields!Day.Value))-ReportItems!Textbox22.Value) / ReportItems!Textbox22.Value )

Note: Textbox22.Value would be the base item/count you are comparing as a percentage.