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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
JayV
Helper I
Helper I

Find duplicates between "date selected" and "date selected" - 30 days

Hi! 🙂
I have date filters (slicer) for year, month and day in a model that uses a table with [ID] and [Date]
I want to show the duplicates between the "Date selected" and ("Date selected" -30 days)
This is the table:
table.png
If i select "December 1st, 2022" it should only show these:
imagen_2022-12-09_134554652.png

Thank you!

3 REPLIES 3
JayV
Helper I
Helper I

I tried using EARLIER() in a calculated column:

 

Repetitive_column =
IF (
    COUNTROWS ( FILTER ( 'Table', 'Table'[ID]  = EARLIER ( 'Table'[ID] ) ) )
        > 1,
    "YES",
    "NO"
)

 

I also tried using this measure and it almost worked (adding the Repetitive_column to the filters if "YES"); It also shows non-duplicates inside the 30d range (if it is a duplicate it shows the row that's inside the 30d range and exclude the one outside):

 

Datefilter_measure =
CALCULATE (
    COUNTROWS('Table'),
    DATESINPERIOD ( 'Table'[Date], LASTDATE ( 'Table'[Date] ), -30, DAY ) 
)

 

amitchandak
Super User
Super User

@JayV , Try meausres like this

 

Have duplicate
measure =
var _cnt = calculate(count('Table'[ID]))
return
countx(Values('Table'[ID]), if(_cnt>1, [ID], Blank()))


Have No duplicate
measure =
var _cnt = calculate(count('Table'[ID]))
return
countx(Values('Table'[ID]), if(_cnt>1, [ID], Blank()))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Excuse me, where should i use this or how could i add the -30 day filter? should i add it to my existing dax?
Thanks for the help!

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.