cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
raghushettyyy
Frequent Visitor

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

@raghushettyyy , 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/



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !!
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !! Connect on Linkedin

Proud to be a Super User!



View solution in original post

2 REPLIES 2
raghushettyyy
Frequent Visitor

Thank You, it worked. @amitchandak 

amitchandak
Super User
Super User

@raghushettyyy , 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/



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !!
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !! Connect on Linkedin

Proud to be a Super User!



View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!