How to write ssrs expression to sum the amounts from different tables

  • Hello,

    I am preparing an ssrs report where I have two tables and each table is using same dataset and filtering by Reimbursementtypeid

    if type id is 34 it will go to first table

    if type id is 35 goes to next table --each table I am filtering and getting the amounts;i am grouping with lookupvalue name column

    so my question is I have another table I need to sum both the total amounts with type id 34 and 35

    how can I write the custom function for this? field is same.(

    Fields!invoiceamt.Value)

  • One thing you could do is define two datasets that share the same datasource -- one for "34" and one for "35". Then it's no problem adding the totals together with an expression like this:

    =Sum(Fields!ColumnIWantToAdd, "DatasetForTable34") + Sum(Fields!ColumnIWantToAdd, "DatasetForTable35")

    Gerald Britton, Pluralsight courses

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply