Forum Discussion
Removing duplicates by two columns of data
Hi All
I have the folwing data, please see the example looking at the first four rows;
I want to be able to remove the duplicate values of "W/Order" value WA00334 lusing "Op No" and "Date".
I only want to retain the higest "Op No" e.g. 25 and the latest date e.g. 22/01/20.
So a filter that woudl remove linew 1 to 3 and retain 4 and then effectivly the same for all other data in the table.
Any help appreciated
Hi AMaxfield ,
you must sort by W/Order, Op No and date in descending order. Then use Table.Buffer to keep that sort order.
If you then remove dups on W/Order it will keep only the topmost row.
More reading here: Bug warning for Table.Sort and removing duplicates... - Microsoft Power BI Community
2 Replies
- ImkeF
Community Champion
Hi AMaxfield ,
you must sort by W/Order, Op No and date in descending order. Then use Table.Buffer to keep that sort order.
If you then remove dups on W/Order it will keep only the topmost row.
More reading here: Bug warning for Table.Sort and removing duplicates... - Microsoft Power BI Community
- AMaxfieldRegular Visitor
Hi Imke
I was not aware of Table.Buffer and it all wroked as you suggested, many thanks for your help.
Andy