@fayaz You will need to update the query as per the table name
(From row In DT.AsEnumerable() Group row By INV =New With { Key .INVNum = row.Item(“Groupbycolumnname”)} Into INVGroup = Group Select New With {.INVNumber = INV.INVNum, .Sum=INVGroup.Sum(Function(r) Double.Parse(r.Item(“SummationColumnName”).ToString()))}).ToList
Thanks @Shubham_Varshney , but when i do it, it throws an error following…
(From row In grpDT.AsEnumerable() Group row By INV =New With { Key .INVNum = row.Item(“Category”)} Into INVGroup = Group Select New With {.Category = INV.INVNum, .AmountSpent=INVGroup.Sum(Function(r) Double.Parse(r.Item(“Amount”).ToString()))}).ToList.CopytoDatatable()
(From row In grpDT.AsEnumerable() Group row By INV =New With { Key .INVNum = row.Item(“Category”)} Into INVGroup = Group Select New With {.Category = INV.INVNum, .AmountSpent=INVGroup.Sum(Function r Double.Parse(r.Item(“Amount”).ToString()))}).CopytoDatatable