Return latest date from a duplicate row

Hi,
How to return latest date from a identified duplicate rows? For example, I have here a row which has the same Customer PO No and Part No but it has different Planned Delivery Date.

Order No Customer PO No Part No CONCATENATE Status Quantity Sales Price Planned Delivery Date
8218665 4505295951 01690-001 450529595101690-0018 Released 8 551.00 7/1/2021
8218665 4505295951 01690-001 450529595101690-00110 Released 10 551.00 8/1/2021

So what I want to return is latest Planned Delivery Date

Order No Customer PO No Part No CONCATENATE Status Quantity Sales Price Planned Delivery Date
8218665 4505295951 01690-001 450529595101690-00110 Released 10 551.00 8/1/2021

I’m using the workflow from Identify the Duplicates and sum the value credits to @ppr.

I have here attached the sample data and the workflow.
LINQ_2KeyGroupIn.xaml (10.8 KB)
Book1.xlsx (11.4 KB)

Give a try on

(From d in dtData.asEnumerable
Group d by k1=d(“Customer PO No”).toString.Trim, k2==d(“Part No”) into grp=Group
let lr = grp.OrderBy(Function (x) CDate(x(“Planned Delivery Date”).toString.Trim))
Select lr).CopyToDataTable

Maybe we have to adopt the date conversion

Hi on what part do I implement this?

within an Assign acitvity
left side: dtResult | DataType: DataTable
rigth side: the LINQ from above

Also have a look here:

Hi, I’m having a problem please check

May we ask you also on the Edition (Studio / Studio Pro) and the version whcih you are using? Thanks