Search code examples
reporting-servicesssrs-2008ssrs-2008-r2

Sum Grouped Data in SSRS


I want to SUM grouped data in a report but can't figure out a way to do it.

My data looks something like this: enter image description here

I am trying to get value 4 in Grand Total which would show the number of orders on different schedules. Simple count would count all the detail lines giving me value 8, count distinct would give me value 3 as there are 3 unique orders. Is there a way to sum subgroup totals (which are calculated as count distinct per schedule). Thanks


Solution

  • You could add a field to the dataset (either in the query, or as a calculated field in the dataset) called Schedule-Order, with values like "1234-1111", "1234-2222".

    Then you can do a count distinct on this field.