Hi. I’ve got the following in an assign activity:
dt.AsEnumerable.Where(Function(x) x(“Column name”).ToString.Trim.Equals(variable)).Sum(Function(x) Convert.ToDouble(x(“Column name 2”).ToString.Trim) ).ToString
This loops through the DT, and sums duplicates of Column name (a number) and sums all sums in Column name 2 (also numbers). However, Column name 2 sometimes includes negative numbers, and I’d like to exclude those. Any input on how to modify my code to do this?