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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
luki
Regular Visitor

Compare rows

Hello experts,

 

I'm struggling to find a solution my for "case". In my dataset, sometimes I have duplicate rows except for one column: version_number so my aim is to compare the data and whenever the line,workcenter,date,shift(or equipe),material and scrap code is the same and there are more than one version_number to get only the line with the latest version number (in dax or power query).

 

luki_0-1703104174579.png

 

Thanks in advance for your support!

 

3 REPLIES 3
Anonymous
Not applicable

Hi @luki ,

Can you explain in more detail what results you need to get? If there are 6 columns of data that are exactly the same, then the 7th column is compared and the line corresponding to the latest version_number is returned. what about if there is more than 1 column of data that is different? For example, if all 7 columns are completely different, what should be returned?
I kindly ask you to create a sample diagram of the desired output so that we can better understand your needs.

Best Regards,
Dino Tao

vicky_
Super User
Super User

This guide walks you through pretty much that situation: https://exceleratorbi.com.au/remove-duplicates-keep-last-record-power-query/

 

luki
Regular Visitor

I don't see how this could help me but I might understand the whole concept?!? 🤔. I have to compare 7 columns. If first 6 columns have the same value and the 7th has more than one value, then I should retrieve the last one (or any of them tbh). I feel I need to mention that one version number could be present multiple times but for other rows where the other columns are not the same (for example: different day, different shift)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.