Filter DataTable by two options in the same Column


Good afternoon,

I have a doubt and I would be glad if someone could help me.

I’m trying to filter a DataTable (Excel Sheet) that has a total of 5 columns, by one of the columns.

That column can have the values A,B or C. I only want to keep the rows with value A and B.

I tried the “Filter” Excel activity but when I do “Read Range” in that sheet after, despites the Filtering he still gets the other values with C in the Column…

Thank you for your attention,

Best Regards,

Miguel Pontes


Use DataTable.Select function. Make it like this:

dtOut.Select(([Your_Column] LIKE ‘A’ or [Your_Column] LIKE ‘B’ or [Your_Column] LIKE ‘C’))

This way you can aggregate rules inside rules. If you have “Your_Column2” and want to apply a filter in that too you can do that this way:

dtOut.Select(([Your_Column] LIKE ‘A’ or [Your_Column] LIKE ‘B’ or [Your_Column] LIKE ‘C’) AND [Your_Column2] LIKE ‘AAAA’ AND ([Your_Column3] LIKE ‘YY’ or [Your_Column3] LIKE ‘XX’))

A good pratice is aggregate the filters by columns. More readable.

Renato Q


Hi @mikePontes

please refer below xaml.
FilterTableExample.xaml (6.9 KB)
ExcelTable.xlsx (9.7 KB)



Hi @mikePontes,

instead of excel filter activity you can use read range to get the all the data(dtresult).
after that you can filter using select statement"[columnname]<>‘C’")



Hi @arivu96,

In the above example, U mentioned Table3.
What is that?



can you give an example ?


@Abishek : he mention Table Name

In Excel On the Ribbon, under the Table Tools tab, click the Design tab. you can see Table Name there