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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Yosinator
Frequent Visitor

Removing duplicates based on a sort order

Hey folks I am trying to get rid of duplicate data and want to keep the record that was last modified. 

I added a sort but the remove duplicate transformation seems to ingore it. 

Yosinator_0-1667858356499.png

 

1 ACCEPTED SOLUTION
Yosinator
Frequent Visitor
4 REPLIES 4
Yosinator
Frequent Visitor

Yosinator
Frequent Visitor

Thank you for responding guys!

Just to be clear there are several instances for duplicated records in the table. 

Will this solution work across the board? 

All the duplicates share the same values in the "hs_object_id" column. 

Yosinator_0-1667922057121.png

 

Ashish_Mathur
Super User
Super User

Hi,

Share complete information.  What do you want to group by? - revenue stream or some other column?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
ryan_mayu
Super User
Super User

@Yosinator 

add a new step in PQ

= Table.Group(Source,"REVENUE STREAM",{"data",each Table.Max(_,"LASTMODIFYDATE")})

change the revenue stream to the column that identify the duplicates

then expand the data

1.PNG

2.PNG

 

pls see the attachment below

 





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

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.