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:

Cust 1101510
Cust 2131215
Cust 3202227

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

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:
This way you get the previous value from a column and can compare the two.


  1. Is “Per3” the column group name in your example?
    I tried with a group name i have and it is not resolving.

    [rsInvalidAggregateScope] The Value expression for the textrun ‘Textbox59.Paragraphs[0].TextRuns[0]’ has a scope parameter that is not valid for an aggregate function. The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a dataset.

    1. Author

      Just as I wrote : Column group name.
      The error shows you have a not entered a valid name.

Leave a Reply

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