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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Self join to remove duplicate values

So I have 2 rows of data:

 

Customer nameDate
xyz

1/5/2021

xyz2/5/2021
mno1/3/2021
mno5/3/2021
abc7/6/2021

 

and I want to just take out the records for the latest date for each unique customer.

 

expected output:

Customer namedate
xyz2/5/2021
mno5/3/2021

abc

7/6/2021

 

and I'm unable to do so because I just have 2 rows and even though the customer names are the same but the dates are different it considers it as a unique record.

 

what should I do to get the expected output I have 12000 rows of such data.

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , In visual you can take max of date with customer .

 

or you can create a new tbale

summarize(Table, [Customer], "Date", max(Table[Date]))

 

or refer this

https://exceleratorbi.com.au/remove-duplicates-keep-last-record-power-query/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank You, it worked. @amitchandak 

amitchandak
Super User
Super User

@Anonymous , In visual you can take max of date with customer .

 

or you can create a new tbale

summarize(Table, [Customer], "Date", max(Table[Date]))

 

or refer this

https://exceleratorbi.com.au/remove-duplicates-keep-last-record-power-query/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.