Sum of column where row is of a certain type

Hi @atomic
to calculate the sum of RA use the below linq query

dt1.AsEnumerable().Where(Function(row) row(“Type”).ToString.Equals(“RA”)).Sum(Function(row) Cint(row(“Amount”).ToString))

use the same way for other values too apart from RA

Try this

Regards,

Nived N
Happy Automation

3 Likes