Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Solved! Go to Solution.
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
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi Imke
I was not aware of Table.Buffer and it all wroked as you suggested, many thanks for your help.
Andy
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
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.