Hi All,
Please help me to compare rows in a same datatable. In a datatable, there 2 columns(Name and Marks). If Name is same in 2 rows then compare the Marks and keep the row having highest Marks and remove the other row from the datatable.
Hi All,
Please help me to compare rows in a same datatable. In a datatable, there 2 columns(Name and Marks). If Name is same in 2 rows then compare the Marks and keep the row having highest Marks and remove the other row from the datatable.
Welcome back to our UiPath community.
dtOutput = dtInput.AsEnumerable.GroupBy(Function(r) r("Name").ToString).Select(Function(g) g.OrderBy(Function(r) Cint(r("Marks").ToString.Trim)).Last).CopyToDataTable
@Komal_Valagadde
Hi ,
Please find the attached workflow
Comparison.zip (67.7 KB)
It worked. Thank you for the solution.
Thank you for the solution
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.