How to find and filter out reverse of all a number in the column

Hello all,

I was trying to filter out all the numbers which have both negative and positive of them. Could we do it using filter data table activity? or any other way. I tried using row index and Filter Data table activity together, but not getting a clear idea
there be the two columns, ‘Amount in DC’ and ‘Amount in Local Curr’
and in ‘Amount in DC’, both 43,979,220 and -43,979,220 are there, so they should be in the list.

Thankyou :smiling_face:

Hi,

Do you want to keep rows which there is no pair of a certain positive number and its negative number in Column “Amount in DC”?
If so, can you try the following?

dt.AsEnumerable.GroupBy(Function(r) Math.Abs(Double.Parse(r("Amount in DC").ToString,System.Globalization.NumberStyles.Any))).Where(Function(g) g.Sum(Function(r) Double.Parse(r("Amount in DC").ToString,System.Globalization.NumberStyles.Any))<>0).SelectMany(Function(r) r).ToArray

Regards,

1 Like

Hi @Yoichi ,
Thankyou for your response and this clear understanding. I wish to keep only the pair of same positive and negative number in column “Amount in DC”

Hi,

Thank you for sharing your requirement. How about the following sample?

Main.xaml (12.4 KB)

Regards,

1 Like

Thanks a lot @Yoichi
It’s working for me. :slight_smile:

1 Like

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