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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Mr_Mr
Helper I
Helper I

Remove all duplicate except first?

I've been banging my head on my desk/kitchen table as this should work but for some reason is eluding me.

 

I have two columns, first is a list of IDs and the second is a date field. Is there a way that I can sort the columns and then remove all the duplicate IDs but it keeps the most recent? So only one ID remains with the most recent date adjacent to it?

 

I have tried several ways but it keeps removing the wrong IDs.

 

Thank you in advance.

4 REPLIES 4
Ahmedx
Super User
Super User

to know how to do this watch my video

https://1drv.ms/v/s!AiUZ0Ws7G26RjAmkzSoR5Dhll_Bq?e=Nw39fj

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Ahmedx
Super User
Super User

you can do it in power query:
1) grouping by ID
2) leave the lines where the maximum date is indicated

ERD
Community Champion
Community Champion

@Mr_Mr , it would be better if you provide some small demo table with the desired result. 

How to Get Your Question Answered Quickly 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.

Stand with Ukraine!


Here is an official way you can support Ukraine financially:
Come Back Alive foundation: https://savelife.in.ua/en/

Thank you!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.