Count Unique Numbers in Excel Pivot Tables

By Lawrence

In the vast realm of data analysis, Excel has emerged as a powerful tool, and the pivot table is one of its most versatile features. However, when dealing with unique numbers, the default pivot table functions might not suffice. This guide will walk you through the process of counting unique numbers in an Excel pivot table, ensuring that you extract the most valuable insights from your data.

Distinct or Unique Count with Excel Pivot Tables | MyExcelOnline
Distinct or Unique Count with Excel Pivot Tables | MyExcelOnline

Before we dive into the steps, let's set the stage. Imagine you're a marketing analyst with a dataset containing customer sales. You want to know the unique number of products sold. The data is extensive, and manually counting unique items would be time-consuming and error-prone. This is where Excel's pivot table comes into play, offering a streamlined approach to data aggregation and analysis.

How to get Distinct Count in Pivot Table - Excel 2016
How to get Distinct Count in Pivot Table - Excel 2016

Preparing Your Data for the Pivot Table

Before creating a pivot table, ensure your data is clean and structured. Remove any duplicates, blanks, or irrelevant data. For our example, let's assume your data is in the following format:

Pivot Table Secrets : Repeat Label Items and Tabular Form in Excel #excel #exceltips #exceltutorial
Pivot Table Secrets : Repeat Label Items and Tabular Form in Excel #excel #exceltips #exceltutorial

CustomerProductQuantity
JohnProduct A5
JaneProduct B3
JohnProduct C2
JaneProduct A4

Creating the Pivot Table

Ultimate excel pivot tables tutorial
Ultimate excel pivot tables tutorial

Now that your data is ready, let's create a pivot table to count the unique products sold.

1. Select any cell in your data range. 2. Go to the 'Insert' tab in the Excel ribbon. 3. Click on 'PivotTable' and choose where you want to place it. 4. In the 'Create PivotTable' dialog box, ensure the correct data range is selected and choose where you want to place the pivot table. Click 'OK'.

Adding Fields to the Pivot Table

How to Update an Excel Pivot Table - Even if the Source Data Changes (+ video tutorial)
How to Update an Excel Pivot Table - Even if the Source Data Changes (+ video tutorial)

With the pivot table created, it's time to add fields to count the unique products.

1. In the 'PivotTable Fields' pane, drag the 'Product' field into the 'Rows' area. 2. Right-click on any cell in the 'Product' column and select 'Value Field Settings'. 3. In the 'Value Field Settings' dialog box, choose 'Distinct Count' from the list of available fields and click 'OK'.

Analyzing the Results

Pivot table trick you don’t want to miss
Pivot table trick you don’t want to miss

Your pivot table will now display the unique number of products sold. In our example, it might look like this:

ProductDistinct Count
Product A1
Product B1
Product C1
Convert a Pivot Table to a Table
Convert a Pivot Table to a Table
10k views on how to use pivot table in excel
10k views on how to use pivot table in excel
the pivot table in 5 minutes info sheet with numbers, times and other information
the pivot table in 5 minutes info sheet with numbers, times and other information
101 Pivot Table - Examples to Master Excel Data Analysis
101 Pivot Table - Examples to Master Excel Data Analysis
467K views · 1.7K reactions | Pivot Tables 101 ✅ Click the link in my bio to register for my FREE Excel class where we’re covering: ✅ Pivot Table shortcuts that instantly clarify trends in data ✅ Data Validation tricks that eliminate repetitive work  ✅ Data Cleaning methods that fix issues in seconds  ✅ a smoother, faster workflow that stops Excel from feeling overwhelming & frustrating  Only a few days left to register! Click the link in bio to join today ✨ #excel #exceltips #corporate #workhacks | Miss Excel | Facebook
467K views · 1.7K reactions | Pivot Tables 101 ✅ Click the link in my bio to register for my FREE Excel class where we’re covering: ✅ Pivot Table shortcuts that instantly clarify trends in data ✅ Data Validation tricks that eliminate repetitive work ✅ Data Cleaning methods that fix issues in seconds ✅ a smoother, faster workflow that stops Excel from feeling overwhelming & frustrating Only a few days left to register! Click the link in bio to join today ✨ #excel #exceltips #corporate #workhacks | Miss Excel | Facebook
How to Create Pivot Tables in Excel
How to Create Pivot Tables in Excel
Pivot Table Magic! Create Multiple Pivot Sheets in Seconds
Pivot Table Magic! Create Multiple Pivot Sheets in Seconds
a computer screen with the words excel number function and numbers on it's side
a computer screen with the words excel number function and numbers on it's side
Unlock Excel’s Power - 50 Pivot Table Tricks
Unlock Excel’s Power - 50 Pivot Table Tricks
How to Combine Data From Pages in Excel
How to Combine Data From Pages in Excel
How To Create a Pivot Table in Excel 2007
How To Create a Pivot Table in Excel 2007
How to Calculate Variance Using Pivot Table in Excel (with Easy Steps)
How to Calculate Variance Using Pivot Table in Excel (with Easy Steps)
How to Create Pivot Table in Excel
How to Create Pivot Table in Excel
How To Create A Pivot Table In Google Sheets - A Step By Step Guide, Google Sheets
How To Create A Pivot Table In Google Sheets - A Step By Step Guide, Google Sheets
Pivot Table Example
Pivot Table Example
Advanced Pivot Table Techniques (to achieve more in Excel)
Advanced Pivot Table Techniques (to achieve more in Excel)
How to Create a Calculated Item in Excel Pivot Table
How to Create a Calculated Item in Excel Pivot Table
How to show monthly values & % changes in one pivot table - Excel Pivot Table Examples
How to show monthly values & % changes in one pivot table - Excel Pivot Table Examples
Pivot Table Super Tips in Excel
Pivot Table Super Tips in Excel
How to Create a Pivot Table on Excel
How to Create a Pivot Table on Excel

As you can see, each product is listed only once, even though some customers bought the same product multiple times.

Filtering the Results

You can further refine your results by adding filters. For instance, you might want to see the unique products sold by each customer.

1. Drag the 'Customer' field into the 'Rows' area below the 'Product' field. 2. Right-click on the 'Customer' field and select 'Remove Label' to remove the 'Customer' column from the pivot table. 3. Your pivot table will now show the unique products sold by each customer.

With these steps, you've successfully counted unique numbers in an Excel pivot table. This skill will empower you to extract meaningful insights from your data, driving informed decisions in your business or personal projects. Happy analyzing!