I’m trying to get aggregate values from data table. But can’t figure out how. Saw some examples in c#, but couldn’t translate those to vb.net.
I have data table
Month, campaign, sales, leads, gross
1 1 5 10 1000
1 2 0 5 0
2 1 2 0 300
2 2 1 3 200
I need to get a result :
Month, sales, leads, gross
1 5 15 1000
2 3 3 500
I don’t want to loop and combine values manually. Please help
You want to
Group by Month? You can useSumto sum the groups:This is a mixture of Linq query- and method-syntax.