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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Syndicate_Admin
Administrator
Administrator

Remove duplicates but leave the record with the most recent date

Hello friends.

I need to remove duplicates from a table, but leave the record that has the most recent Valuation Date.

example:

The beneficiary JOSE ORBEGOZO, appears 2 times, with valuation dates of March 19 and May 10.

When removing duplicates, the most recent date should remain: May 10.

The table has more than 11 records with many duplicate values.

I need to do this in the Power Query, so that when you loaded it into the Power Bi, the table is ready.

or... is there any option to do it in a calculated table directly on the Power Bi?

linareca_0-1623892019892.png

Thanks a lot.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Syndicate_Admin , refer if this blog can help

 

https://exceleratorbi.com.au/remove-duplicates-keep-last-record-power-query/

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

View solution in original post

5 REPLIES 5
v-yalanwu-msft
Community Support
Community Support

Hi, @Syndicate_Admin ;

Have ’s reply helped you to find the solution to this problem?  I also think that group by is more suitable for this case, and I made a simple sample based on your data, as follows:

vyalanwumsft_0-1624255741423.png

If so, would you like to the helpful replies as a solution so that others can learn from it and close this topic?
Thanks in advance!

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks a lot. This is indeed a solution. I have been very supportive of your support.

ryan_mayu
Super User
Super User

@Syndicate_Admin 

you can try group by in the PQ.

grouping the all the columns except the date column, then do the Max operation on the date column

1.PNG





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

Proud to be a Super User!




amitchandak
Super User
Super User

@Syndicate_Admin , refer if this blog can help

 

https://exceleratorbi.com.au/remove-duplicates-keep-last-record-power-query/

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

Thank you, it has helped me too.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors