I have been struggling to compare column values in a SSRS matrix (pivot table), but finally found a way around it.

My solution is rather simple, but it works.

Here is a simple example of the Matrix:

ExampleM1M2M3
Cust 1101510
Cust 2131215
Cust 3202227

For example, I would like to compare the M2 value with M1 (15 vs 10) etc.

ExampleM1d1M2d2M3d3
Cust 110015510-5
Cust 213012-1153
Cust 3200222275

My initial thought was to use the ‘Previous’ function, but that did not seem to work, as it showed the previous ROW instead of COLUMN value.

However, you can add a group name to the function (it is not documented in Visual Studio, but it works) where you add the Column group name like so:
=Previous(Sum(Fields!RegBedrHJ.Value),”Per3″)
This way you get the previous value from a column and can compare the two.

Leave a Reply

Your email address will not be published. Required fields are marked *