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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Dedupe one Column based of date in another column

Hi, 
I have a feeling that this has a simple solution, that I just can't seem to figure out.
I'm trying to depude one Column (SaleID), assigning priority on which value to keep based on the oldest date which is located in another column.
Input:

SaleIDDate
12021

1

2023

1

2020
22021
22023
22022
32023
32021
32022

Output

SaleIDDate
12020
22021
32021
4 REPLIES 4
AlexisOlson
Super User
Super User

Group by SaleID and take the min over Date as the aggregation for that column.

 

Anonymous
Not applicable

Hi, thanks for the suggestion.
Unfortunetly this didn't work as it removed some of the Sale ID's alltogether, do you have any idea why that would happen?

That doesn't make sense to me. Any chance you can share a reproducible example?

Anonymous
Not applicable

Hi, I got this to work in the end by doing table.buffer() and sorting by date within the buffer then deduping afterwards.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors