Filter multiple value in one column

filter multiple value in one column
I want to select the data city where Delhi,patna,chennai… It might be N number of city.

Please guide me.

Suppose data are below
City
Delhi
Kolkata
Patna
Chennai
Mumbai
Pune

Could you be clearer. It’s hard to understand what you really want to achieve here.

Edit: If I’ve understood it correctly, you want to get data values for only Delhi, Patna and Chennai. But in that case, there should be more columns in your datatable. Then, you could do something like this:

dt.Select(“[city]=‘Delhi’ OR [city]=‘Patna’ OR [city]=‘Chennai’”) which will give you an array of all the datarows where ‘city’ value is one of the three cities.

1 Like

Use Filter Data Table activity and add your conditions

image

1 Like

Thanks, your understanding is correct. I have done this activities.
But want to pick multiple cities(It can be dynamic list. As per requirement city can be two or three or n number of city) from excel and filter in any data set within a specific column.

This is so late but I’m facing the same issue right now and have found a way to work on a dynamic list of filters like yours. This is similar to the one I answered here

DataTable.Select accepts an IN operator where you can pass multiple values. This is where I learned the syntax: DataView RowFilter Syntax [C#]

1 Like

The IN operators works like a charm :slight_smile:

Filter Datatable activity. You can change the And to Or.

image

1 Like