Search code examples
reporting-servicesexpressionssrs-tablix

Tablix row sum by one column value


I have a tablix with two columns. One is for tax rate (0%, 5%, 10%... - =Fields!TaxRate.Value), other for total tax values (=Fields!TotalTax.Value).

In my report I receive these values as:

  1. Tax rate 20% - $500
  2. Tax rate 5% - $20
  3. Tax rate 20% - $450
  4. Tax rate 5% - $25

How can I put all the same tax rates in one row and sum up the values, by same tax rate, such that the result is:

  1. Tax rate 20% - $950
  2. Tax rate 5% - $45

Solution

  • You'll need to add a Group based on TaxRate to the Tablix. The Group will be grouped on Fields!TaxRate.Value. When adding the Group, make sure to include a Header or Footer.

    In the Header or Footer row that's created, you can add a field with the expression =Sum(Fields!TotalTax.Value), which will display the total tax for each different TaxValue Group.

    See Add or Delete a Group in a Data Region for specific implementation details.