Column filter

I have a query w.r.t. multiple filtration in Data Tables.

I have an large dt in which Data looks something like this

Col1 | Col2 | Col3
a | 13 |
a | 13 |
b | 11 |

I want to select the unique records.
Can anyone assist.

I tried using loop, but I am unable to filter the data for second part.


As you said, you can use a For Each loop and inside add an If activity:

If row(“Col1”).ToString = “a” AndAlso convert.ToInt32(row(“Col2”))=13 then
Assign activity --> row(“Col3”).ToString = “Yes”
Assign activity --> row(“Col3”).ToString = “No”
End If

With this you will have the specific datatable with Col3 updated. If you want to write it back to the excel you can use a “Write Range” activity.

Also, you may want to check LINQ methods in order to filter datatables even though what I added above should be enough.


You can use the filter data table activity,

That was just an example.
There are 500+ unique values in Col1, once filtered, I need to filter using Col2 values (as shown in example - using 11, 12, 13) against which I need to map Col3.
Using If activity is not a optimal solution as I have to log for each case.

hi, I have updated the ques. for better clarity.
The solution is good for small dataset but not a large one.

Main.xaml (11.7 KB)

Hi Ayush, refer the attached xaml which will add the third column as true or false based on duplicate rows in a table.

1 Like


The following solution shows the output for only duplicate values. Is it possible, if there is no duplicate to add it in a separate dt, and?