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
PowerBI_Query
Helper II
Helper II

Filter duplicate rows with latest date

I have a data table as shown in the sample file   Sheet1 (before) 

I need the output as shown in Sheet2 (after)

The data is not sorted. I need to exclude duplicate rows using latest date as criteria and retain non-duplicate numbers as it is.

9 REPLIES 9
Omid_Motamedise
Super User
Super User

The link doesn't work for me if you could provide a screen of your data, that would be great but based on the general description, you can easily add a column and provide the number reputation of each row and the napply filter, or you can use table.group as mentioned in the above


If my answer helped solve your issue, please consider marking it as the accepted solution.

Before (data is unsorted) highlighted number are repetetive need number in A column with latest date in M column. 

PowerBI_Query_0-1727119050331.png

After

PowerBI_Query_1-1727119087356.png

 

 

I agree with @Omid_Motamedise. Either of our proposed solutions will work on that data.

ronrsnfld
Super User
Super User

Your link doesn't work, but one way is to 

  • Group the table by whatever columns you wish to check for duplications
  • Select the row with the latest date
  • Re-expand the grouped table

 

Table.Group(#"Previous Step",#"List_of_Cols_to_Check_For_Duplicates",{
        {"DeDuped", (t)=>Table.SelectRows(t, each [Date]=List.Max(t[Date]))}

 

The code is placed as an additional step in the Advanced Editor.

 

There are several numbers with their respective dates so I can't select a date manually

Nowhere in my code am I selecting your date manually. You merely need to know the name of the column that contains the dates and the columns that you wish to check for possible duplications. 

The table group function will select the appropriate date. 

  • The process I listed is merely what the code does.

 

 

This is the link

That's the same non-functional link you posted earlier.  It returns only: "https’s server IP address could not be found."

Away from my computer now. If you can't figure it out from my answer, I'll check back later.

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.

Top Kudoed Authors