To count DISTINCT records in a PIVOT TABLE

brouts

New Member
Joined
Jul 8, 2003
Messages
47
Hello everybody,

I have read the last posts on counting issues in pivot tables but I have found no clue for my trouble.

I'm using a "Count of xxxx" in a pivot table and it is counting the number of records of this column or category.
What should I use if I want to count the number of distinct records??

I cannot find such an option.
I am using Excel 2000.

Thank you in advance for your help,
Ludovic
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
To count the distinct records you need to add a column to your source data, eg:
BOOK2
ABCDEFG
1NameValueDistinctData
2Andrew10.5NameSumofValueSumofDistinct
3Bill21Andrew61
4Fred30.5Bill21
5John41Fred91
6Andrew50.5John41
7Fred60.5GrandTotal214
Sheet1


The formula in C2 is:

=1/COUNTIF(A:A,A2)

copied down.
 
Upvote 0
Solution with helper column added (like suggested by Andrew Poulsom) works if the pivot hasn't page fields. In fact if there is a Page Field, and with it you filter the data in pivot, sum of "distinct" is no more correct. Suppose to add a column "D" with values S or N, and header "test", add "test" to page fields of the pivot, and use the field to choose only "S" or only "N". The pivot counts "distinct" only when a row respects the page field value "S" or "N", so the sum of "distinct" is no more "1" for Andrew etc.
Any workaround to this big problem???
 
Upvote 0

Forum statistics

Threads
1,214,786
Messages
6,121,546
Members
449,038
Latest member
Guest1337

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