Distinct COUNT in Excel Pivot

There are two ways to “distinct count in excel pivot”: the quick way you copy and the durable way you understand. This page gives you both. The exact Excel answer is above with a tool to test it; below, we build the small mental model that makes the fix stick, so the next variation of the same problem solves itself.

Exact answer

In Excel: create the PivotTable with "Add this data to the Data Model" ticked, drag the field into Values, then Value Field Settings ▸ Summarize value field by ▸ Distinct Count.

On this page7
ƒxQuick Pivot SummarizerLive
Groups
3

Grand total: 1,250.50

RegionSum
West125.50
East1050
South75

The same thing in your own sheet

Sum · Excel & Sheets

Put your group keys in a column (here starting at E2) and fill the formula down.
Real pivot table: Excel — select your data, Insert → PivotTable, drag the group column to Rows and the value column to Values. Google Sheets — select the data, Insert → Pivot table. · Runs entirely in your browser — your data never leaves this page.
Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

What this does

A normal PivotTable can Count rows but not count each different value once. Distinct Count becomes available when the PivotTable is built on the Data Model, which you choose with a checkbox in the Create PivotTable dialog. The setting is fixed when the PivotTable is created, so an existing PivotTable without it has to be rebuilt. The Data Model option is not available in every Excel edition; where it is missing, a helper column that marks the first occurrence of each value gives the same result with an ordinary Sum. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. Treat “distinct count in excel pivot” as a small repeatable workflow rather than a one-off click you hope to remember next time. Use a small test block before the live file, so any surprise in the affected pivot table shows up while it is still harmless. When this is a ribbon command, the selection matters more than the button: confirm the range, apply the command, then spot-check the output before saving. That turns a data step that keeps your analysis trustworthy into a method you can reuse, explain, and defend when the workbook leaves your screen.

A worked example

An orders table has 10 rows for 4 customers. Insert ▸ PivotTable, tick Add this data to the Data Model, put Region in Rows and Customer in Values. Count of Customer shows 10; open Value Field Settings, choose Distinct Count, and it shows 4. Without the Data Model, add a column with =IF(COUNTIF($B$2:B2,B2)=1,1,0) and sum that column in the PivotTable. How many different customers, products or users per region is a different question from how many rows — and it is the one most reports actually need. If this is something you do often, add the command to the Quick Access Toolbar (right-click it on the ribbon and choose Add to Quick Access Toolbar) or learn its shortcut, so next time it is one click instead of a hunt through the menus.

In Google Sheets

This is a command rather than a formula, so there is no syntax to carry over. Google Sheets arranges its commands in menus across the top instead of a ribbon, names some of them differently and does not have every Excel command — look for the equivalent in the Sheets menus or its help before assuming the steps match. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top, the tool proves it, and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. Here is the takeaway for “distinct count in excel pivot”: follow the steps at the top, check the result on the sheet itself, and keep undo in mind while you experiment. Done once deliberately, it becomes something you do from memory in Excel rather than something you search for again.

Common mistakes

  • Looking for Distinct Count on a PivotTable that was not created with the Data Model — rebuild it with the box ticked.
  • Using Count, which counts rows, not different values.
  • Helper-column counts that break when the PivotTable is split by a second field, because the first occurrence is counted only once overall.
  • Trailing spaces or different spellings making the same customer count twice.

Frequently asked questions

Why is Distinct Count missing from Value Field Settings?

The PivotTable was not added to the Data Model. Create a new PivotTable and tick Add this data to the Data Model.

Can I count unique values with a formula instead?

Yes — in Excel with dynamic arrays, =COUNTA(UNIQUE(B2:B11)) counts the different values in a range.

Can I change an existing PivotTable to Distinct Count?

Only if it was created on the Data Model. Otherwise insert a new PivotTable from the same data with the Data Model box ticked.

Other ways people ask this

This is also commonly searched as “excel pivot count distinct”, “count distinct excel pivot” and “excel pivot distinct count”. They describe the identical operation, so you are in the right place no matter how you phrased it.

Why do people search for this in so many different ways?

Because the same task has many names. “excel pivot count distinct”, “count distinct excel pivot”, “excel pivot distinct count” all point at the one operation explained on this page, which is why they all lead here.