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

Unique members of a parent campaign

Here's part of our SF structure:


Parent Campaign A ( 0 members )

Campaign A.A ( 10 members )

Campaign A.B ( 50 members )


Campaign A.Z ( 700 members )




Parent Campaign B ( 0 members )

Campaign B.A ( 532 members )

Campaign B.B ( 1,000 members )


Campaign B.Z ( 321 members )


... So on and so forth.


Now our organization wants to know how many unique members are in each parent campaign.  If a contact belongs to Campaign B.A and Campaign B.B, then that contact will show up twice for counting all members who is in a campaign belongs to Parent Campaign B.


The CampaignMembers object has over 300,000 records. I thought about pulling the contactID and the ParentID out using joins, but I'll only pull 2,000 records at a time with the current limitations.


Any ideas how to get the number of unique members from each parent campaign?