condition:
Duplicate rows consider on Id and member columns
1 remove only those which product column is empty
2 if all product col value are empty of duplicate set then take only one and other remove
3 if duplicate rows has different product then take those rows also
Input:

yellow highlited rows want to delete
Expected Output:

@Anil_G
in general we can handle it by grouping the data and processing the members
Try this
Dt.AsEnumerable.GroupBy(function(x) x(0).ToString+x(1).ToString+x(5).ToString).Select(function(x) x.First).GroupBy(function(x) x(0).ToString+x(1).ToString).SelectMany(function(x) If(x.Count>1,x.Where(function(y) Not String.IsNullOrEmpty(y(5).ToString)),x)).CopyToDataTable
Hope this helps
Cheers
Thanks @Anil_G Why getting this error

Thanks @Anil_G
Could you help me with this
for above same condition
if Sample1 and Sample2 has data then i want to keep those rows also and if duplicate rows sample1 and sample2 column has duplicate value then only take one other row delete itInput:
Expected Outpu:
Try this
Dt.AsEnumerable.GroupBy(function(x) x(0).ToString+x(1).ToString+x(5).ToString+x(6).ToString+x(7).ToString).Select(function(x) x.First).GroupBy(function(x) x(0).ToString+x(1).ToString+x(5).ToString+x(6).ToString).SelectMany(function(x) If(x.Count>1,x.Where(function(y) Not String.IsNullOrEmpty(y(7).ToString)),x)).CopyToDataTable
cheers
Hi @Anil_G Why extra column add here

r
May be when reading there are extra columns…please check and filter them using filter datatable activity
cheers
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.