---
title: Count Number of Duplicate Opportunities on Account | Rollup Helper Use Case Library
description: "USE CASE: Free Salesforce app Rollup Helper can help you clean up unneeded or duplicate Opportunities, or find out what's causing duplicates to happen."
---

[GET DEMO](https://www.passagetechnology.com/any-product-one-on-one) **+1 (224) 655-6779

[![Trusted Salesforce service partner Passage Technology](https://www.passagetechnology.com/hubfs/2021/Nav-header-logo_PT.png) ](https://www.passagetechnology.com)

# Count Number of Duplicate Opportunities on Account

[![Free Salesforce business guides to help admins/developers, project managers, sales managers, and decision makers. Download the free PDF series now: Reinventing Your Business, Reimagining Your Salesforce®.](https://www.passagetechnology.com/hubfs/2021/Essential-Salesforce-Guide_Helper-Suite.png) ](https://www.passagetechnology.com/en/essential-guide-for-salesforce-admins-developers)

## **Problem: **You want to count the number of duplicate Opportunities on an Account so you can either clean up unneeded Opportunities, or find out what’s happening in the sales process to cause duplicates to happen.

## Solution: First, create two rollup settings, two number fields, and a formula field.

You will need to create two rollup settings, two number fields, plus a formula field.

Create two number fields on Account. One called “Total Number of Opportunities” and one called “Number of Unique Opportunities.”

The first rollup will be to get the Total Number of Opportunities.

- Select Account as the target object
- Use the new number field “Total Number of Opportunities” as the target field
- Use Opportunity as the Source Object and the standard AccountID field as the Relationship field
- The Rollup Type is Count, the source field is left as the Default IsDeleted.
- There are no filters or other configurations to the setting.
- Save and run your setting

The second rollup will be to get the Number of Unique Opportunities. It determines the uniqueness of the Opportunity based on its Name, but if necessary more complex criteria could be added.

- Select Account as the target object
- Use the new number field “Number of Unique Opportunities” as the target field
- The Source Object is again Opportunity, and relationship field is AccountId.
- The Rollup Type is Count, however this time change the Source Field to be Name, and select the Unique values only Checkbox as well. This will exclude any duplicates from being included in the count.
- There are no filters or other configurations to the setting.
- Save and run your setting

The third field used in this use case is a formula field that returns a number called “Number of Duplicate Opportunities” on Account. The formula for this field is as follows:

```
Total_Number_of_Opportunities__c - Number_of_Unique_Opportunities__c
```

By subtracting the Total Number of Opportunities from the Number of Unique Opportunities, we are able to determine the Number of Opportunities that are duplicates.

Tags: [Account](https://www.passagetechnology.com/rollup-helper-use-cases/topic/account), [COUNT](https://www.passagetechnology.com/rollup-helper-use-cases/topic/count), [Opportunity](https://www.passagetechnology.com/rollup-helper-use-cases/topic/opportunity), [duplicate records](https://www.passagetechnology.com/rollup-helper-use-cases/topic/duplicate-records)

| [** Calculating an Account Level Net Promoter Score (NPS) ](https://www.passagetechnology.com/rollup-helper-use-cases/calculating-an-account-level-net-promoter-score-nps) | [Rollup Helper Use Case Library](https://www.passagetechnology.com/rollup-helper-use-cases) | [ Most Recent Contract End Date on Account ** ](https://www.passagetechnology.com/rollup-helper-use-cases/most-recent-contract-end-date-on-account) |
| --- | --- | --- |

[ Optimize Sales Rep Reporting and Leaderboards in Salesforce ](https://www.passagetechnology.com/rollup-helper-use-cases/sales-rep-reporting)

[ Rolling Up Marketing Cloud Account Engagement (Pardot) Activity ](https://www.passagetechnology.com/rollup-helper-use-cases/rolling-up-marketing-cloud-account-engagement-pardot-activity)

[ Streamline Sales Pipeline ](https://www.passagetechnology.com/rollup-helper-use-cases/streamline-sales-pipeline)

[ Creating Grandchild Rollups ](https://www.passagetechnology.com/rollup-helper-use-cases/creating-grandchild-rollups)

[ Calculate the Number of Cases on a Salesforce Contact Record ](https://www.passagetechnology.com/rollup-helper-use-cases/number-of-cases-on-a-contact)

[ Creating Account Hierarchy Rollups without Coding ](https://www.passagetechnology.com/rollup-helper-use-cases/account-hierarchy-rollup-without-code)

[ Easily Create a Custom Last Activity (Task/Event) Date ](https://www.passagetechnology.com/rollup-helper-use-cases/last-activity-task-event-date)

[ Roll-ups Using Formulas Rather than Static Criteria ](https://www.passagetechnology.com/rollup-helper-use-cases/roll-ups-using-formulas-rather-than-static-criteria)

[ Identify The Primary Contact On An Account ](https://www.passagetechnology.com/rollup-helper-use-cases/identify-the-primary-contact-on-an-account)

[ Opportunity Line Item Schedule Rollups ](https://www.passagetechnology.com/rollup-helper-use-cases/opportunity-line-item-schedule-rollups)

© 2026 Passage Technology LLC All Rights Reserved. [Privacy Policy](https://www.passagetechnology.com/privacy-policy) | [Purchasing & Legal](https://www.passagetechnology.com/purchasing-and-legal) | [Terms of Service](https://www.passagetechnology.com/terms-of-service) | [App Security](https://passagetech.my.site.com/KnowledgeBase/s/article/Security-and-Privacy-Policy-1578080055496)

- [** ](https://www.facebook.com/passagetech)
- <https://x.com/passagetech>
- [** ](https://www.linkedin.com/company/passage-technology)
- [** ](https://www.youtube.com/channel/UCK2tzaCWVC7PmFCXrLirnZw)

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Cady Wakitsch",
    "url" : "https://www.passagetechnology.com/rollup-helper-use-cases/author/cady-wakitsch"
  },
  "dateModified" : "2026-04-22T17:47:36.053Z",
  "datePublished" : "2022-03-14T16:59:21.000Z",
  "headline" : "Count Number of Duplicate Opportunities on Account",
  "mainEntityOfPage" : {
    "@id" : "https://www.passagetechnology.com/rollup-helper-use-cases/count-number-of-duplicate-opportunities-on-account",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://www.passagetechnology.com/hubfs/Logo%20PT_colors_wide_on-white.png"
    },
    "name" : "Passage Technology LLC"
  }
}
```