Sebastián
Sebastián

Reputation: 482

SSRS add Total row with differences

I want to add a total row in Reporting Services where the difference (in numbers and percent is available). Attached you'll se the current img in SSRS and the requested output in Excel as example.

SSRS

enter image description here

Excel

enter image description here

Upvotes: 2

Views: 234

Answers (1)

alejandro zuleta
alejandro zuleta

Reputation: 14108

Supposing you are going to compare only two years you can use this approach.

To calculate change from one year to the next.

=Sum(iif(Fields!year.Value= Parameters!Yearfrom.Value,Fields!incurred_losses.Value,0)-
Sum(iif(Fields!year.Value= Parameters!Yearto.Value,Fields!incurred_losses.Value,0)

For change in percentage:

=(Sum(iif(Fields!year.Value= Parameters!Yearfrom.Value,Fields!incurred_losses.Value,0)-
Sum(iif(Fields!year.Value= Parameters!Yearto.Value,Fields!incurred_losses.Value))/
Sum(iif(Fields!year.Value= Parameters!Yearfrom.Value,Fields!incurred_losses.Value,0)

Use this expression for every column in your tablix.

Let me know if this helps you.

Upvotes: 3

Related Questions