Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
dinoscool3
Helper I
Helper I

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:

emaildateDuplicate?Duplicate after first day?
joe@joe.com8/25/202221
joe@joe.com8/25/202221
bob@bob.com8/26/202211
Mary@mary.com8/2632
Mary@mary.com8/2632
Mary@mary.com8/2732

 

I don't need it as a column, a measure would also work as I'm adding it into a table visusal. Thank you!

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community 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]))))+1

the final show:

vyalanwumsft_0-1662602694370.png


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.

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community 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]))))+1

the final show:

vyalanwumsft_0-1662602694370.png


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.

amitchandak
Super User
Super 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])

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.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.