PDA

View Full Version : count unique values



vonkrieg
2016-07-22, 11:04 AM
hello

i have a huge table and i used a pivot on it

to simplify it lets say i have 3 products sold during a month.

how can i find in how many days i've sold product A?

Count is not working because i need unique values (like in the table if in one day i've sold 10 products i have 10 line but i want it counted just once)

thanks

SUNNY KOW
2016-07-27, 09:20 AM
You can try adding a helper column to your source data and use this formula.
Column A can be the Product and Column B can be the Date. Change it to suit your needs.



=IF(COUNTIFS($A$2:A2,A2,$B$2:B2,B2)>1,0,1)



After that create a Pivot from the source data. The helper column must be in the Values area.