Forum Discussion
PaulM1970
Feb 14, 2025Copper Contributor
Counting unique values in two columns
How do I count how many total unique names are associated with a unique date? See attached.
I'd like to assign a number in the highlighted cell next to each name, indicating the number of unique dates beside that name.
Example: The number next to Coach's name should be 4.
Thank you.
In C2:
=COUNT(UNIQUE(FILTER($A$2:$A$781, $B$2:$B$781=B2)))
Fill down.
As option you may pivot data. PivotTable with option adding data to data model, Name in rows, Distinct count of dates in values.
Or use formula
=GROUPBY($B$1:$B$781, $A$1:$A$781, LAMBDA(a, COUNT(UNIQUE(a))),3)
- PaulM1970Copper Contributor
Thank you, as always.
In C2:
=COUNT(UNIQUE(FILTER($A$2:$A$781, $B$2:$B$781=B2)))
Fill down.
- PaulM1970Copper Contributor
Thanks Hans.
Can you help with formulas for the two orange cells on the attached please?