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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ItSupportElm
Helper III
Helper III

DAX Formula who don't display duplicate value who have 1 hour difference

I have an issue that I can't resolve after some research.

Here my situation :

2021-02-19_11h44_41.png

 

 

I want to delete duplicate data based on time who have just few second diffrence like the "IdUtilisateur" : 7971, and i want to keep the one who have comment , so the seconde row (18/01/2021 13:25:45 with the comment "Probleme de calendrier livraison")

I don't know if my example is clear. If you have any question ask me.

Thank you for your future answer

Great Day

1 REPLY 1
amitchandak
Super User
Super User

@ItSupportElm , One way if remove seconds from the date

 

New date = Date = date(year([datetime]),month([datetime]),day([datetime])) + Time(Hour([datetime]),Min([datetime]))

 

Other wise we need to create a flag based on the previous record, like 30 sec diff

 

new column =
var _max = maxx(filter(Table, [id] = earlier([id]) && [datetime] <earlier([datetime])),[datetime])
return
if( datediff( _max,[datetime],second) <=30,1,0)

 

remove 1

 

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

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.