Is there a Count Distinct in Pivot Tables?

Berrett

Board Regular
Joined
Aug 6, 2004
Messages
249
I have a workbook and a pivot table.

On the pivot table I have
ROWS: Ethnicity and Behavior Response

Behavior response includes items like Restraint and Suclusion

On VALUES I have a count of Student ID.

So, naturally it is counting the number of student IDs in each Ethnicity in each Behavior Response. So I have a row that says for American Indian / Alaskan Native students there are 13 incidences of Restraint.

However, when you click into the data you find that all 13 incidents are the same student. What I would like to do is count the DISTINCT Student IDs in each Ethnicity and Behavior Response category -- so it should return 1 instead of 13.

Can this be done?
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi Berrett,

Standard PivotTables in Excel do not have Distinct Count as an option in the aggregate types. If you have PowerPivot installed, you can use Distinct Count on a PivotTable created with PowerPivot.

For earlier versions of Excel that don't support PowerPivot, there are some workarounds that involve adding a helper column to your dataset, or using an SQL Query.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top