ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count Distinct Values by Group Using Pivot Table (NM) (https://www.excelbanter.com/excel-worksheet-functions/12770-count-distinct-values-group-using-pivot-table-nm.html)

MCP

Count Distinct Values by Group Using Pivot Table (NM)
 


Peo Sjoblom




Ken Wright




Debra Dalgleish

To get specific help, you'd need to provide some details about what
you're trying to do, and the layout of your pivot table.

A pivot table won't calculate a unique count. However, you could add a
column to the database, then add that field to the pivot table.

For example, if you want to count the customers in column A, use the
following formula in row 2:
=IF(COUNTIF(A$2:A2,A2)=1,1,0)

Copy this formula down to all rows in the database.

Add this field to the pivot table data area, as a Sum, and you'll get a
count of unique items, or a count of records. You could multiply this
field in your formula.


MCP wrote:

--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



All times are GMT +1. The time now is 07:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com