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
NenadV
Helper III
Helper III

Removing duplicates after sorting does not work as expected

So I have key column and a date column and i am trying to keep only last date for every key. I first sort by key column and then by date column descending, and everything is looking fine. But when I click on remove duplicates, it does not remove rows that I wanted to remove, for some keys it remove wrong rows.

sort.png

Here is screenshot of table, after sorting, everything seems fine. I marked rows that are expected to be removed after I click on remove duplicates(based on key column).

sort1.png

But, instead row number 3 from first screenshot, row number 2 is removed.

Please, can someone explain me what is going on here?

2 ACCEPTED SOLUTIONS
Pragati11
Super User
Super User

HI @NenadV ,

 

There is an existing thread for this. Chek this if it helps:

https://community.powerbi.com/t5/Desktop/Keep-only-the-latest-date-for-duplicate-entries/td-p/638447

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

View solution in original post

Anonymous
Not applicable

 

 

try this

 

Table.Group(yourTabName, {"key"}, {{"LastDate", each List.Last(_[date])}})

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

 

 

try this

 

Table.Group(yourTabName, {"key"}, {{"LastDate", each List.Last(_[date])}})

Pragati11
Super User
Super User

HI @NenadV ,

 

There is an existing thread for this. Chek this if it helps:

https://community.powerbi.com/t5/Desktop/Keep-only-the-latest-date-for-duplicate-entries/td-p/638447

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

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.

Top Solution Authors
Top Kudoed Authors