Ask Search:
Chris UttleyChris Uttley 

How to add Record Count as a column on a summary report?

I have a pretty simple summary report on a custom object. It summarizes two columns, but I want to get the Record Count as a separate summarized column.
I cant figure out how to do this? Any suggestions?Summary Report Image
Best Answer chosen by Moderator (salesforce.com) 
Lucas NietoLucas Nieto
- step 1

step 2

step 3

step 4

All Answers

Lucas NietoLucas Nieto
Add a formula field on the report, do "Record Count" as the formula itself, select all summary levels, and you should be good to go.
Lucas NietoLucas Nieto
- step 1

step 2

step 3

step 4
This was selected as the best answer
Nebojsa ZgonjaninNebojsa Zgonjanin
Check this:

http://success.salesforce.com/ideaView?c=09a30000000D9xo&id=087300000006tdeAAA

The power of 1 – counting many things, one by one.

A lot of reporting is often about counting. But when you use summary reports in salesforce.com and count, you’ll mostly get the same number. For example, if I have 5 Accounts each with 5 Opportunities, and I use the record count in a summary report, I will get 25 as the total of Accounts, and 25 as the sum of the record count of opportunities.

Something obviously isn’t as I'd expect… but what?

Well, there are 25 records in the list and you are looking at 25 rows on the screen. The counts are right in that respect - but how to get the counts of the exact number of accounts no matter how many rows are on the screen?

The solution

For opportunities – create a formula fields “# of opportunities� in the opportunity and make it a number, and enter the number 1 in the formula. Also, make it visible to all roles, and uncheck the box to no place it any page layouts.




REgards,
NAsh
Chris UttleyChris Uttley
Thank you Inieto.

That works! So I am happy.

There seems to be no need for me to add a 'count = 1' field to the object, which is good!
Bernard FrançoisBernard François
Note that this is only possible for reports using 'Summary Format' and 'Matrix Format', not for 'Tabular' - see screenshot.
It took me a while to figure this out, as I never noticed this drop down list before...

User-added image
Alon NirAlon Nir
Hi,
Nice trick.
Any way to add the count as a new column in a matrix report?
Thanks :)
Vishal SharmaVishal Sharma
Hi ,

If we do not want to create any formual field and need to create a Record Count, then we can do the following:-

Click on the Show Drop Down and Un-Check the details drop down list value. A Record count colum will automatically be created.

Thanks :)