In our Salesforce org, we have multiple contacts under accounts, and when we create a report on the accounts and contacts, we get repeated accounts for the related contacts. The sales team wants to count the unique values of account names so that they do not have to maintain data for repeated accounts and only asses the unique accounts name.
As a Salesforce admin, I created a custom report on the unique count of the account records. Now, I will explain how you can create a report on unique count records for a new or existing Salesforce report.
In this Salesforce tutorial, we will learn to count unique values in Salesforce reports. We will discuss the method to count unique values in Salesforce Lightning only. The Classic version of Salesforce does not have a feature where we can count unique values of records in a Report.
Unique values in Salesforce
In Salesforce, unique values are individual values within a specific field or column of a Salesforce Report. The counting of these unique values is not repeated in a single report, which means that even if they are in reputation, they are counted once. These unique values can be useful for data analysis and data management.
In the example below, I will explain the method for counting unique values in Salesforce reports.
We will discuss the method of Counting unique values in Salesforce from two approaches.
- Count unique values in Existing Salesforce Reports in Lightning
- Count unique values in the New Salesforce Report in Lightning
Count unique values in Existing Salesforce Reports in Lightning
To Count unique values in Existing Salesforce Reports in Lightning, login to your Salesforce account and follow the steps below.
1. On the Salesforce Lightning Setup page, go to the App Launcher and search for sales. From the options in the dropdown, select Sales under the heading Apps.

2. In the Sales App of the org, click on the Reports tab.

3. In the Reports window, select a report from the list of reports in which you have to count unique values.
In this example, I have selected the report name Account and Contact details for Leads.

4. In this report, I have to show the unique count of the accounts. To do that, click on the dropdown arrow in the account column and select Show unique count from the options in the dropdown.

5. When we click on Show Unique Count, we won’t see any changes in the edit mode. To see the changes, click on the Save & Run button.

As we click on the Save and Run button, the report will run in the next window, and at the top of the report, we can see the unique count as shown in the picture below.

Now, we have successfully set a unique value count in Salesforce Lightning in the existing report.
Count unique values in a new Salesforce Report in Lightning
To Count unique values in a new Salesforce Report in Lightning, navigate to the Setup page of Salesforce Lightning and follow the steps below.
1. To Count unique values in a new Salesforce Report in Lightning, we first need to create a report. To do that, click on App Launcher and search the Sales App.

2. From the org. Sales Application, click on the Reports tab.

3. In the Reports window, click on the button New Report.

4. In this step, we will select the Category and Report type for the new report. Since I am creating this report for opportunity records, I have selected Opportunity as a Category and Opportunities from the Report type name column.
After selecting Category and Report type, click the Start Report button on the right sidebar.

5. When we click on Start Report, a report table will be generated. We will apply filters to this report to make it according to our requirements. To add filters, click on the Filters tab on the left sidebar.
For example, I have set the Show Me field to All Opportunities, the Close Date field to Current FY, and the Opportunity Status field to Any to include all opportunities.

6. Now, go to the report table and select the column in which you have to count the unique values. In this example, I have selected the Stage column. Click on the dropdown of the selected column and select Show Unique Count.

7. To view the unique count records, click on the Save & Run button at the top right of the screen.

8. When we click on the Save & Run button, a pop-up window will appear. In this window, we will enter the required details to save this report.
- In the Report Name field, enter the name relevant to the report you have created. In this case, I have entered the Report Name as Opportunites Detail Report.
- Click on the Report Unique Name field and it will auto-fill according to the Report Name you have entered.
- In the Folder field, select Public Reports as a folder to make this report visible to all users.
- After making the above changes, click on the Save button.

When we click on the Save button, the report will be saved and run in the next window. In the next window, we can see the report with a unique value count of the selected column Stage, as shown in the picture below.

Now, we have successfully created a report displaying Unique Count Values in Salesforce Lightning.
Conclusion
In this Salesforce tutorial, we have learned about Counting Unique Values in Salesforce Lightning. Along with this we also discussed Unique Values in Salesforce. We have learned to count the unique value in the existing and new Salesforce reports with the help of the examples above.
You may like to read:
- How to Create an Open Cases By Owner report in Salesforce
- How to Create a Revenue by Lead Report in Salesforce
- How to Create Report Sort by Record Count in Salesforce
- How to Create Loss Rate Report in Salesforce
- How to Embed Report Chart to Salesforce Record page
- How to Create an HTML Email Status Report in Salesforce
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.