function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JosephTJosephT 

Help with Report Formulas

I am trying to filter out the record count on a summed report so that only contacts with the number of activities greater than 5 are displayed? 

Basically, when I run a report that includes contacts and their associated activities, instead of showing all contacts with all activities, I would like to see only contacts whose "record count" or "rowcount" is greater than 5.  This would permit me to see my most active/high-touch contacts.

I have attempted a few fomula's to acheive this result to no avail?  Anyone ever tackled this before that may have some suggestions?
sfdcfoxsfdcfox

This is Salesforce, not SQL. I don't think the report engine can be manipulated into giving you this type of report, since the filters are in effect record-by-record, not on the summaries (I think that's a "HAVING" clause, right?).

~ sfdcfox ~

JosephTJosephT
I appreciate the feedback but I can not give up that easily.  There has to be a solution that can be found or created as a formula.
sfdcfoxsfdcfox
Are you in Enterprise Edition? You can use the API to query all records in an S-Control or other program and then filter out the results afterwards.

Alternatively, you can create an S-Control that works as a custom roll-up summary formula (by updating the contact's "total activity" custom field via the API).

I could create a proof of concept for you, but you'd have to be EE or it wouldn't work. Let me know if you're interested.

~ sfdcfox ~
SteveBowerSteveBower
Why does there *have* to be?

I don't believe it can be done either.  If you write some custom code to keep track of how many activities there are, then sure.  However that requires triggers, or for the user to run an s-control either explicitly or implicitly when they change activities, etc.

However solutions sometimes comes to people who just didn't know that a solution was impossible.  So, If you do figure it out, I'd love to know how.  Thanks, Steve.