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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Remove Duplicates Leaving Only Most Recent Documents

Giving Mr. Beug all the credit for his work in the two year old post below, I have a similar issue. My first attempt at achieving my goal is below.

 

My need: Remove ALL Duplicate titles of four out of 20 types of CQTitles, displaying only the most recent of those four in the table items and graph tallies. All training documents are in the database. All certification should appear (since there are no duplicates of those docs). Only the most recent qualifications should appear, even if there may be duplicates in the data set.

 

The four CQTitles for which no duplicates should appear; rather only the most recent: Medical, Live Fire Refresher, Self-Contained Breathing Apparatus Fit Test

 

let
     Source = SharePoint.Tables("https://SiteName/", [ApiVersion = 15]),
     #".........." = Source{[Id=".........."]}[Items],
     #"Renamed Columns" = Table.RenameColumns(#"..........",{{"ID", "ID.1"}}),
     #"Extracted Date" = Table.TransformColumns(#"Renamed Columns",{{"DteofCQ", DateTime.Date, type date}}),
     #"Sorted Rows" = Table.Sort(#"Extracted Date",{{"DteofCQ", Order.Descending}}),
     #"Buffer Table" = Table.Buffer(#"Sorted Rows")
in
     #"Buffer Table"

 

 

Shag-X_0-1612481722759.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , This case has been explanied here. See if this can help

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

https://www.youtube.com/watch?v=rqDdnNxSgHQ

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

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , This case has been explanied here. See if this can help

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

https://www.youtube.com/watch?v=rqDdnNxSgHQ

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.