How to filter datatable with result of two column

Hi,
I have datatable like picture below
image

I wanna get only row where column2 - column3 <> 0
So how could i get the row i want? please help
Thanks

Hi @ThomasTH

You can try with Filter Data Table activity

Check out the Blog

Regards
Gokul

You Can also try with this LINQ expression @ThomasTH

DTInput.AsEnumerable.Where(Function(r) Not ((r(0).ToString).Equals("0") OrElse (r(1).ToString).Equals("0"))).CopyToDataTable

Regards
Gokul

Try the filter datatable activity as shown below in the image

image

HI @ThomasTH

Check out the XAML file

DtNotContainZero.xaml (7.3 KB)

image

Regards
Gokul

1 Like

Hi Gokul,

Thanks for reply but that not what i means
i means like example in my picture, Smith have value in column 2 is 15 & column 3 is 14
So i’m gonna do column 2 minus column 3 and i’ll get result is 1.

So my question is how could i get new datatable where data row which the rows has column2 minus column3 <> 0 ?

Try with this expression to Sub @ThomasTH

CDbl(CurrentRow(0).Tostring) - CDbl(CurrentRow(1).Tostring)
1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.