I need to sum some values based on another column value since I will not know what values I got in Column01
Example
Column01 | Column 02
A --------------------10
A -------------------- 5
A -------------------- 7
A -------------------- 8
B --------------------10
B --------------------- 2
B ----------------------3
B ----------------------4
@Alamyr_Junior
have look on the component from connect channel:
on the activities Group By Aggregation, Native Aggrgation
Or you can do it with linq
Assign Activity:
left side: dtResult - Datatype Datatable
right side: yourDatatableVar.Clone
Assign Activity:
Left Side: dtResult
Right Side:
(From d in YourDataTableVar.AsEnumerable
Group d by k=d(“Column01”).toString.trim into grp=Group
let ra = new Object(){k,grp.Sum(Function (x) CInt(x(1).toString.Trim))}
Select dtResult.Rows.Add(ra)).CopyToDataTable
I already solved the issue using your activities, thank you very much. I didn’t realize about the doubles right on but after search more about the activity I could use easily.