Requirement is to filter for report with multiple complaints for same customer. Added account as grouping by row but unable to filter the group count > 1 kinda of statement. How to achieve this in salesforce reports. I am looking for a simple Group by field having count > 1 sql statement... Unbelievable I have to post such a question as documentation is not available about this functionality. please help.
2 Answers
You can't do this with a report.
Refer the Idea
But you can certainly do this with a query.
Go to the Developer Console, click on the Query Editor tab, and enter the query as follows:
select count(id) CaeCount, accountid Id
from Case
group by accountid
having count(id) > 1
- Create a custom field
Case_Count__c
on Account - Use DLRS to roll up the Count of Cases to this field
- Use Calculation Mode =
Scheduled
to run a one-time job to update all Accounts; then switch to Calculation ModeRealtime
- Use Calculation Mode =
- Change your report filter to include on Accounts where
Case_Count__c
> 1