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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
QuasemS
Frequent Visitor

Remove duplicates based on values

Hi,

 

I'm trying to remove rows based on duplicate values in a column. I know how to use the Query Editor to do this. However, the duplicate values in that column has different values corresponding to it in the table. I only want to keep the record with the highest value in the other columns, and get rid of the duplicates with have lower values.

 

When I do the regular remove duplicates step, it always seems to keep the lowest value. I want to do the exact opposite. Anyone know if there is some flexibility with this option where I can achieve this?

 

Thanks!

1 ACCEPTED SOLUTION
Beckham
Advocate II
Advocate II

I've had this problem before. I'm using datesThe way I found around it was 4 steps:

 

Step #1. Use group by to find the max value. Add all rows to the bottom.

 1.PNG

Step #2. Expand all the rows. Basically this adds a new column with the max values down the side of the table

 

Step #3. Add a custom column like this:  if date_applied = Max Date then true else false

 

Step #4. Filter down to just true. 

 

Hope this helps.

View solution in original post

10 REPLIES 10

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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