Search code examples
reporting-servicesexpressionssrs-2008ssrs-2012reportingservices-2005

How to calculate RunningValue % in SSRS using expressions


I'm trying to calculate YTD% which is shown below:

screenshot

the calculation goes like (90+77)/(90+68)

                      (90+70+68)/(90+68+68) 

My tablix dataset gets two values sum(Amt1) and sum(Amt2) which are calculated by the Tablix for every FiscalQuarter i.e Grouped by Quarter.

The tablix has a RowGroup which is grouped on: FiscalQuarter. So to calculate YTD %

I did this

=RunningValue(Fields!Amt1.Value,sum)/RunningValue(Fields!Amt2.Value,sum)

which didn't quite work.


Solution

  • You should include the scope of the source within the expression:

    =RunningValue(Fields!Amt1.Value, Sum, "DataSet1") / RunningValue(Fields!Amt2.Value, Sum, "DataSet1")