Learn Excel - Distinct Count in an Excel Pivot Table - Podcast 1924

If you like this content, please consider visiting the video on YouTube and subscribe to the MrExcel Channel to show your support!
This video has been published on Sep 11, 2014.
How to do a Distinct Count or a Unique Count in an Excel 2013 Pivot Table. If you still have Excel 97-2010, watch the outtake for the ugly method prior to Excel 2013.
maxresdefault.jpg


Transcript of the video:
The MrExcel podcast is sponsored by eduPOW – home of the $5 Courses.
Check out my Excel class: Excel formulas - The Dirty Dozen at tinyurl.com/edupow5.
Learn Excel from MrExcel podcast, episode 1924.
Distinct Count in Excel 2013.
Pivot Table.
Hey, welcome back to the MrExcel netcast, I'm Bill Jelen.
One of the things we've always wanted to do in Pivot Tables, is get a Distinct Count.
And this was always impossible, or very, very hard in Excel 2007 and earlier.
You know, you would have to add a function on here that’ll do =1/COUNTIF of the number of customers.
And in Excel 2010, you could download the PowerPivot, but now, in Excel 2013, it is so much easier: INSERT, PivotTable, and there's an extra check box here, to “Add this data to the DataModel”.
Now, normally we would do this, when we have two tables to join, but it just makes this whole problem absolutely beautiful.
Over here, on the right hand side, I'm going to take Sector and drag it to ROWS.
And then I'm going to take Customer and drag it to VALUES, and we get a count.
But that's not the count of unique customers or distinct customers, that's the number of orders that came in, the number of total records.
And that's not what we want, we want the distinct customers.
I'm going to choose that field, go to Field Settings and here, on Summarize Values By, because the data is in the data model, we have this extra choice, that we don't have in regular Pivot Tables or in Excel 2010 Pivot Tables Distinct Count.
Bam, there you go, absolutely amazing and easy, easy to do.
It's been such a problem for so long, so Excel 2013 and the Data Model solved this.
I can already hear the comments at YouTube: well, wait, I don't have Excel 2013 yet.
What… What are you waiting for, it's almost the end of 2014.
Excel 2015 is almost here, it's time to go, let's upgrade.
Hey, I want to thank you for stopping by, we’ll see you next time for another netcast – MrExcel.
Okay, okay… For those of you, that are still back in Excel 2010 or Excel 97, or whatever it is… =COUNTIF($D$2:$D$546,D2) - count if how many times the customers in D2 to D564.
Press F4, is equal to D2.
So Ford is in there 56 times.
Edit that formula to =1/ COUNTIF($D$2:$D$546,D2).
And let's say, we don't want the date there, we just want a number.
Double-click to shoot that down, then Insert, PivotTable, OK, put Sector down the left hand side.
And then Distinct, Sum of Distinct in Values, and you'll get the same answer.
But it's very, very inflexible, seriously, Office 365 Home Premium, $9/month, come on…
 

Forum statistics

Threads
1,223,667
Messages
6,173,684
Members
452,527
Latest member
ineedexcelhelptoday

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