Hi. We'd like to run a report to show Accounts with multiple Contacts (and exclude ones with a single Contact). If someone could point me in the right direction to set this up it'd be a great help.
Many thanks
James
Hi. We'd like to run a report to show Accounts with multiple Contacts (and exclude ones with a single Contact). If someone could point me in the right direction to set this up it'd be a great help.
Many thanks
James
You don't say how many Accounts you currently have so the update may be tricky but the way to do this is to set up a new Integer field on Accounts (say, "contact_count_c") that is Calculated and set the formula for the calculation to be the Count of related Contacts. You also have the option of using the CountConditional to filter the Contacts you are counting if you need that.
The report is then simply a case of reporting where the contact_count_c > 1 (or > 5 or any other value you need).
Thanks,
JH.
Absolutely perfect! Thank you John
Hello James,
If you would like to try an approach that doesn't require updating the account records an Advanced Report could do it.
Create the following custom query:
SELECT a.id, a.name, COUNT(ac.contact_id) as contact_count FROM accounts_contacts ac JOIN accounts a ON ac.account_id = a.id GROUP BY a.id, a.name HAVING COUNT(ac.contact_id) > 1;
I hope this helps
André