3

Along the lines of a previous question that was solved: Counting parent records in parent-child report

I am trying to produce a report which currently is Matrix, is grouped by Email Address on the left (looking at Duplicates by email address essentially) and I want to count the Email Addresses (ONE per address, not one per RECORD).

Any ideas? I've tried variations of the previous solution, but it was for a parent-child report. This is just a single-table report (Lead in this case).

enter image description here

2
  • Not sure I understand your question. An instance of an email address would be an instance of a record with that address. Can you clarify? EDIT: I think I get it now... what is your end goal, to have a count of unique leads or to send an email?
    – greenstork
    Commented Apr 9, 2013 at 18:20
  • To get a count of unique email addresses within the report. [email protected] may have TEN LEADS, but his email address will count as ONE when summarized.
    – AMM
    Commented Apr 9, 2013 at 18:42

1 Answer 1

1

I'm fairly certain that there isn't a reporting-based solution here. In the unique parent-child report, the formula was only counted once because there was only one parent record. In this scenario however, there are multiple lead records and I suspect the formula field is being counted up multiple times, one for each lead record, which doesn't help find unique email dupes.

You have a few code-based options to address this. One would be to add all of these leads to a campaign and have a VF page that removes email dupes. You could then report on those campaign members. Another would be a batch apex job that marks a field on all but one lead as being a duplicate email. A third solution would be to create a parent object of lead and a batch apex job that parents dupes to the same object based on email match. Honestly, these all seem like overkill solutions but I can't think of a declarative way to achieve this.

1
  • I actually previously wrote (and have in play) a trigger system that marks any non-first instance of an Email Address on leads as "Duplicate" (so that the first one is not marked, and the rest are)... but it works, I'll say, 98% of the time. I eventually need to go back and figure out the shortcomings, which likely stem from (1) me not handling Deletions well and (2) possibly other holes.
    – AMM
    Commented Apr 10, 2013 at 14:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .