Filter dataTable?

I want filter as condition as below.

I have DataTable name = DT

I want filter column num >=11 and num <=20 or num = 0

Please guide me for solve it. ( LINQ or activity filter Data Table)

image

Hi
kindly try this

Thanks

1 Like

Hi,

Another solution:

dt = dt.AsEnumerable.Where(Function(r) (Int32.Parse(r("num").ToString)<=20 AndAlso Int32.Parse(r("num").ToString)>=11) OrElse Int32.Parse(r("num").ToString)=0).CopyToDataTable()

Regards,

1 Like

@Ahmad_Rais

Now I use filter as below.


image

How to keep value that CInt(CurrenRow(“Issue Date”).Tostring) = 0 ?
image

you can do another filter with condition to keep only “Issues Date” = 0
or remove if “Issues Date” <> 0

@Ahmad_Rais Keep IssueDate = 0

How to set in filter DataTable activity?