Dim Amounts As New DataTable 'Your code to load actual DataTable here
Dim amountGrpByDates = From row In Amounts
Group row By dateGroup = New With {
Key .Yr = row.Field(Of Integer)(“Yr”),
Key .Mnth = row.Field(Of Integer)(“Mnth”),
Key .Period = row.Field(Of String)(“Period”)
} Into Group
Select New With {
Key .Dates = dateGroup,
.SumAmount = Group.Sum(Function(x) x.Field(Of Decimal)(“Amount”))}
You can use the for each loop activity and iterate through all the rows.
Create one expense variable and inside for each loop you can add expense=Covert.ToDouble(item.tostring)
Make sure your variable expense is of the type double.