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
Lila05
New Member

Remove dublicates, keep value based on another column

Hi,

 

I have a table with all operations on a production order. I could like to remove all duplicates BUT keep the latest operation. 

For example: Rows marked with purple is the one I would like to save based on latest date. How do I do that? Many thanks in advance for all efforts!

 

Production order no.OperationDate:
1a2023-02-18 18:20:15
1b2023-02-20 13:15:20
1c2023-02-20 14:30:00
2a2023-02-17 13:15:20
2b2023-02-20 15:30:00
3c2023-01-30 16:23:30
3d2023-02-05 07:12:59
   
1 ACCEPTED SOLUTION
sebastiandyrby
Resolver I
Resolver I

Hi
You can create a measure that filters the data depending on the operation no. and then checks if the selected date is the latest. I've done it like this:

sebastiandyrby_0-1676886447308.png

You can then add this measure to your table or just use it as a filter. This will only keep the latest dates for each production order no.:

sebastiandyrby_1-1676886499124.png

Hope this helps.

Best regards.

View solution in original post

3 REPLIES 3
sebastiandyrby
Resolver I
Resolver I

Hi
You can create a measure that filters the data depending on the operation no. and then checks if the selected date is the latest. I've done it like this:

sebastiandyrby_0-1676886447308.png

You can then add this measure to your table or just use it as a filter. This will only keep the latest dates for each production order no.:

sebastiandyrby_1-1676886499124.png

Hope this helps.

Best regards.

Hello again! 

I wonder if you by any chance also know how to express this in power query?

 

BR.

 

Thank you! It worked 🙂

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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