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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
SuzanneSte
Frequent Visitor

Check for repeats within a time frame

Hello,

can you advise me on this.   This is doing what I need it to do. However I now need to add in an additional filter that will not count a repeat invitee email as a duplicate if the associated date field 'events-export'[Event Created Date], is more than 3 months ago

Would appreciate the help 🙂 

 

RepEmailCol =
//Check_Duplicate
VAR currentvalue='events-export'[Invitee Email]
VAR count_filtering =
    COUNTROWS(
        FILTER(
            'events-export', 'events-export'[Invitee Email]=currentvalue)     
    )      
  VAR Result =
       IF(
           count_filtering >1, "Duplicate", "Distinct"
       )
       RETURN Result
       
1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @SuzanneSte ,

 

Try to change you metric to:

RepEmailCol =
//Check_Duplicate
VAR currentvalue = 'events-export'[Invitee Email]
VAR count_filtering =
    COUNTROWS (
        FILTER (
            'events-export',
            'events-export'[Invitee Email] = currentvalue
                && 'events-export'[Event Created Date]
                    >= TODAY () - 90
        )
    )
VAR Result =
    IF ( count_filtering > 1, "Duplicate", "Distinct" )
RETURN
    Result

 

This will be based on current date but you can change this to be picked from a slicer or something similar.

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @SuzanneSte ,

 

Try to change you metric to:

RepEmailCol =
//Check_Duplicate
VAR currentvalue = 'events-export'[Invitee Email]
VAR count_filtering =
    COUNTROWS (
        FILTER (
            'events-export',
            'events-export'[Invitee Email] = currentvalue
                && 'events-export'[Event Created Date]
                    >= TODAY () - 90
        )
    )
VAR Result =
    IF ( count_filtering > 1, "Duplicate", "Distinct" )
RETURN
    Result

 

This will be based on current date but you can change this to be picked from a slicer or something similar.

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thank you so much 🙂 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors