Extract First value from column and put the first row of each set

I have this type Data
1.Retrieve the rows that contain duplicate values in the “EmpID” column.
2.Within each set of duplicate IDs, extract the first value from the columns that start with “E-” (in screenshot blue colour highlighted).
3.Replace the value in the first row of each duplicate set with the extracted value (highlighted in red in the screenshot).
4. If first row has value then don’t change only update when it’s null or empty

@Garyy Can you please rephrase the question?

Sure please check it.

@Garyy

You can follow the same approach as the last row…the only change wuld be the assign activity where you would use filtereddt.Rows(0)(currentItem.ColumnName)

Reference to previous post

Cheers

1 Like

Hi @Anil_G Thank you for your help
I want to delete unwanted row only take first row of each duplicate set can you help me

@Garyy

You can use this

dt = Dt.AsEnumerable.GroupBy(function(x) x("Emp ID").ToString).Select(function(x) x.First).CopyToDataTable

Cheers

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