Michaeljep
(Michael Jeppesen)
December 22, 2020, 8:45am
1
Hi
based on a DT, how can I sum the amounts based on the main column and still “keep” the orders that the sum is based on.
Maybe this picture better shows what I’m trying to achieve
I have looked into BalaRevas activities, but it only sums the rows, it doesn’t give me which rows that has been summed.
WangJidong
(Amos Wang)
December 22, 2020, 8:49am
2
@Michaeljep
Hi, Try it
dt.AsEnumerable.Sum(Function(x) Convert.ToDouble(x(“Column”).ToString.Split(" ".TocharArray)(1).Trim) )
Michaeljep
(Michael Jeppesen)
December 22, 2020, 9:30am
3
Thank you for the try, it doesn’t quite give me what I need, I need the first dt to be converted to the dt below. So a sum and added columns with the orders summed up.