Search code examples
reporting-servicesaggregatedistinctrdlcrdl

RDL Aggregate Distinct Field Per Group


I would like to aggregate the distinct values per group in my data.

Example:

enter image description here

As you can see, I am having trouble on the Aggregate column.
The expression I'm using is =SUM(Field3)

Groupings:
Parent = Key
Child1 = Field4
Child2 = Field5

I can see issues with what I currently have but I'm on my wit's end. I'm also unable to find a Distinct method available, only CountDistinct. Any ideas? TIA!

NOTE: I'm using SSRS 2008 on Visual Studio 2013 Update 4.


Solution

  • I resorted to using Row_Number() OVER (PARTITIO BY .. GROUP BY ..) AS 'Row Number' and added the condition that Row Number must be equal to 1 in order to avoid duplicate aggregation of values in my RDL expressions.