Summing Only Visible Rows in SSRS 2014 where the visibility condition includes a group aggregate

325 views Asked by At

I have an SSRS report that only shows groups for which the count of values is greater than 1 - the objective is to show records with duplicate email addresses, with details for each record, and a total for all records that have duplicates:

[email protected]
            John Doe
            Jane Doe
        Count: 2
[email protected]
            James Doe
            Janet Doe
            June Doe
        Count: 3
Total: 5

The basic report has a single row group with group expression

Group on: [Email]

The base recordset also includes records with unique email addresses, but these are filtered out from the report using a group filter with condition

CountRows() > 1 = true

The problem I have is how to show the correct total count for all records that have duplicates. I understand that report aggregates are not affected by group filters, so simply using Count() for the report total shows the wrong value as it also includes all the single unique records that are filtered out at the group level.

How can I show the correct report total, including only the records for which there are duplicates (i.e. that are visible based on the group filter setting of CountRows() > 1)?

0

There are 0 answers