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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
willpage
Helper II
Helper II

Filter out dupliacte by date

Hello,

 

I have a data source with an ID column and a date/time column, amongst others. Sometimes an ID can appear more than once, but the date will be different, and so may the other columns. I want to ignore all but the most recent instance of a record when the ID appears more than once. Is this possible in Power Query or DAX, and if so, how?

 

Thanks.

2 ACCEPTED SOLUTIONS
rainer1
Resolver III
Resolver III

Hi @willpage ,

 

you can achive these with Power Query editor.

 

This is an Example:

1. Select the columns "ID", "lat", "longit", "Time" at the same time with "Ctrl".

2. Click Remove Duplicates

 

Remove duplicates based on values from multiple cells.jpg

 

-------------------------------------------------------------------
Did I answer your question? Mark my post as a solution!
It was useful? Press Thumbs Up!

View solution in original post

Hi @willpage 

sry for the delay, the workaround is to add an index column after sorting before removing duplicates. This breaks query folding and forces it to operate in the order you just defined by your sort.

 

-------------------------------------------------------------------
Did I answer your question? Mark my post as a solution!
It was useful? Press Thumbs Up!

View solution in original post

3 REPLIES 3
rainer1
Resolver III
Resolver III

Hi @willpage ,

 

you can achive these with Power Query editor.

 

This is an Example:

1. Select the columns "ID", "lat", "longit", "Time" at the same time with "Ctrl".

2. Click Remove Duplicates

 

Remove duplicates based on values from multiple cells.jpg

 

-------------------------------------------------------------------
Did I answer your question? Mark my post as a solution!
It was useful? Press Thumbs Up!

@rainer1  Thanks for your response. Which of the duplicates will it remove doing that? I always want to keep the most recent one.

Hi @willpage 

sry for the delay, the workaround is to add an index column after sorting before removing duplicates. This breaks query folding and forces it to operate in the order you just defined by your sort.

 

-------------------------------------------------------------------
Did I answer your question? Mark my post as a solution!
It was useful? Press Thumbs Up!

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.