Forum Discussion
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.
Hi Anonymous ,
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
-------------------------------------------------------------------
Did I answer your question? Mark my post as a solution!
It was useful? Press Thumbs Up!Hi Anonymous
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!
3 Replies
- rainer1
Resolver III
Hi Anonymous ,
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
-------------------------------------------------------------------
Did I answer your question? Mark my post as a solution!
It was useful? Press Thumbs Up!- AnonymousNot applicable
rainer1 Thanks for your response. Which of the duplicates will it remove doing that? I always want to keep the most recent one.
- rainer1
Resolver III
Hi Anonymous
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!