Forum Discussion
Count Duplicates after First Date
I have a table of registration data, I have set up a column that counts how many times someone has registered, however I also want a count of who has registered after the date of their first registration. Here's my example with the last column being what I need:
| date | Duplicate? | Duplicate after first day? | |
| [email protected] | 8/25/2022 | 2 | 1 |
| [email protected] | 8/25/2022 | 2 | 1 |
| [email protected] | 8/26/2022 | 1 | 1 |
| [email protected] | 8/26 | 3 | 2 |
| [email protected] | 8/26 | 3 | 2 |
| [email protected] | 8/27 | 3 | 2 |
I don't need it as a column, a measure would also work as I'm adding it into a table visusal. Thank you!
Hi, dinoscool3 ;
Try it.
Measure = CALCULATE(COUNT('Table'[email]),FILTER(ALL('Table'), [email]=MAX('Table'[email])&&[date]>CALCULATE(MIN('Table'[date]),ALLEXCEPT('Table','Table'[email]))))+1the final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- v-yalanwu-msftCommunity Support
Hi, dinoscool3 ;
Try it.
Measure = CALCULATE(COUNT('Table'[email]),FILTER(ALL('Table'), [email]=MAX('Table'[email])&&[date]>CALCULATE(MIN('Table'[date]),ALLEXCEPT('Table','Table'[email]))))+1the final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - amitchandakSuper User
dinoscool3 , for Joe, duplicate after the first day should be 0 ?
For you case try like
a new column =
if([Duplicate] >1, [Duplicate]-1, [Duplicate])
- dinoscool3Helper II
I don't think that would work because if Joe had three registrations on the first day if I did that he'd still be 2, unless I'm missing something.
Essentially, I want to count any registrations after the first day they registered. But the first date is variable based on the person.