Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.
=Sum(iif(Fields!Year.Value = Max(Fields!Year.Value), Fields!Amount.Value, Fields!Amount.Value - Fields!Amount.Value)) - Sum(iif(Fields!Year.Value = Min(Fields!Year.Value), Fields!Amount.Value, Fields!Amount.Value - Fields!Amount.Value))
It will work for both the detail and the total rows. Max(Fields!Year.Value)
returns 14, and
Fields!Amount.Value - Fields!Amount.Value
returns 0 so the first part of the formula is like:
Sum(iif(Fields!Year.Value = 2014, Fields!Amount.Value,0))
Which is the sum of all the 2014 values. The second part of the formula (after the - ) is the same but with min (so 2013).#,##0.00;(#,##0.00); ;
MatrixVariance.rdl
Open in new window
But it depends on your data if this will work. The data needs to be summed by year and month already, and the data needs to be sorted by year (so first is 2013 and last is 2014). See the attached example.If your data has another format it might still be possible to calculate the difference with a more complex formula. But to help you with that I need an example of your data.
MatrixVariance.rdl