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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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
v-junyant-msft
Community Support
Community Support

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

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

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.