Tuesday, May 4, 2010

Get Groups Count in SSRS

Today One of My Friend asked me, How to Get the Count of groups in a SSRS Report. I have suggested the following solution.

=CountDistinct(Fields!FieldName.Value, "DataSet1")

CountDistinct - This is a Method which will return the Unique Count
Fields!FieldName.Value – Here pass the group field name
"DataSet1" – Scope Detail, Where the group field exists

This Expression will return the Group counts exists in a report

Hope it helps you!


  1. Thanks lot, its worked fine to me

  2. Yes, excellent solution. And if you want to limit the counting to a specific group, you could do that as well. So instead of "DataSet1" you could have "Group1" or "Group2" depending on the scope you want to count in.