Forum Discussion
Fahad Qamar
Apr 22, 2018Copper Contributor
Extracting data based on date value
I have a table with multiple columns For eg customer-id, order-id, reciept-no and date of purchase Where customers-id, order-id and date of purchase might have duplicate values however reciept-no ...
Wyn Hopkins
Apr 24, 2018MVP
Hi
It's harder with Power Query as I think you need to write a function or play about with the M code
Attached is my solution with using a Custom Function
I first grouped the data by Customer No and Code, then added a custom function to remove the latest date record from each of these grouped tables
By default then if there was only 1 record, the function would remove it as that is the latest record.
SergeiBaklan
Apr 24, 2018Diamond Contributor
Wyn, just in case, I did that through merging - practically the same question https://techcommunity.microsoft.com/t5/Excel/Extracting-data-in-the-new-sheet/m-p/185699