Total Row Count for Grouped Values in SSRS 2008

user2287143 picture user2287143 · May 1, 2013 · Viewed 57.8k times · Source

I have a report that displays names of all accounts and activities performed under each of them.

AccountName: ABC Corp Activity: Installation

I want to group the AccountName and get the total number of Activities performed for each account.

ABC Corp: 1

How can I accomplish this in SSRS 2008? I am able to group the AccountName but I need a way to convert the Activity column to int so I can get the total.

Help appreciated!

Answer

amartine picture amartine · May 1, 2013

You can add a total row for the Account group and give your total field the expression CountRows("AccountGroupName"), to count the Activity detail rows for each Account group.

You can also put the total value at the level of the group row / group header.

More details about Function CountRows could be found here: http://msdn.microsoft.com/en-us/library/ms156330(v=sql.100).aspx