Identify/Count DISTINCT Names per date
Employees can provide multiple responses each day if they want. But I only want to count a name once each day. So in the below, employee # 12345 submitted two responses on 12/16. In the 'Count' column, I only want the box checked for one of their submissions on 12/16. Essentially I'm looking for unique employee #s each day. I have tried a couple things and think I'm close but I'm not sure what I'm doing wrong.
=IF(MATCH([Employee #]@row, [Employee #]:[Employee #], 0) = MATCH(Date@row, Date:Date, 0), 1, 0) - this checks the box of the first two boxes but none of the rest.
=IF(MATCH([Employee #]@row, [Employee #]:[Employee #], 0) <> MATCH(Date@row, Date:Date, 0), 1, 0) - this checks the box of the last 5 rows but neither of the first 2.
What am i missing?
Answers
-
Add the below 2 helper columns:
- "LINE-ID" : Auto Number Column
- "ROW#" : Column Formula: =MATCH([LINE-ID]@row, [LINE-ID]:[LINE-ID], 0)
You count column should be:
=IF(MIN(COLLECT([ROW#]:[ROW#],[Employee #]:[Employee #],[Employee #]@row,Date:Date,Date@row))=[ROW#]@row,1)
This will check off the first time the employee name shows up on that date.
-
I had the LINE ID in there but couldn't figure out how to use it in this scenario. THANK YOU!!!!!
The above works but I don't understand the need for the second helper column. Can't you just use the LINE ID in the count formula? The Row# column seems duplicate? It seems to work without the row# but maybe there is a reason to have that column that I'm not seeing or thinking of?
-
Yes, you could use it without the ROW#.
If you specifically wanted to check off the first one submitted then you need the ROW#...
This process is the same I use for finding duplicates where I want flag specifically the second row as a duplicate entry.
I just default to doing it this way...
-
I got it. For me, it doesn't matter if it marks the first one or not, just need it to mark one. This is a pretty handy little trick. Thanks!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 422 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 143 Just for fun
- 59 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!