How to compare rows in a column in a single datable to check if they match and delete them

How can I identify matching rows in a column and delete them
attached is a screenshot of a demo Datatable

So I’m trying to remove both rows having Dog since they match


You can try to use the following options

Remove Duplicates Range
Remove Duplicates Range
Filter Data Table

Filter Data Table will be suitable in my view


Take an assign activity and pass this on right side replace dt with your datatable name and left side of assign pass a datatable variable where you want to save new datatable


Can you please show me how I can use filter datatable to get my desired output

dt.AsEnumerable().GroupBy(Function(x) x(“ColName”).ToString)[Select](Funtion(y) y.First()).CopyToDataTable()

1 Like

please find this solution.

Sequence.xaml (7.9 KB)

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.