Hi All,
I want to Find a duplicate of a particular column and Make duplicate value as in one row.Can anyone help me for this ,how can i write linq query for this.
Below is the input and output show.
Input

Output

Hi All,
I want to Find a duplicate of a particular column and Make duplicate value as in one row.Can anyone help me for this ,how can i write linq query for this.
Below is the input and output show.
Input

Output

Try this syntax:
distinctDt = InputDt.DefaultView.ToTable(True, "Column A")
distinctDt is of DataType System.Data.DataTable
Hope it helps!!
Check the below flow for better understanding
=> Read Range Workbook

Output → InputDt
=> Use below syntax in Assign activity:
distinctDt = InputDt.DefaultView.ToTable(True, "Column A")
=> Write Range Workbook distinctDt back to excel.

Regards
Try below expression in Assign Activity
NewDT = DT.AsEnumerable().GroupBy(Function(row) row("Column A")).Select(Function(group) group.First()).CopyToDataTable()
Hope it will helps you ![]()
Happy Automation
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.