Hi,

I need to calculate the sum of “AGE” column and write it in to beside total column.

Attached snapshot for reference.

Thanks,

Rishi

Hi,

I need to calculate the sum of “AGE” column and write it in to beside total column.

Attached snapshot for reference.

Thanks,

Rishi

Please try this

`Dt.AsEnumerable.Sum(function(x) cdbl(x("Age").ToString))`

Or

`dt.Compute("Sum(Age)", "")`

- this returns an object

Cheers

1 Like

Thanks Anil.

Dt.AsEnumerable.Sum(function(x) If(x(“Age”).ToString.IsNumeric,cdbl(x(“Age”).ToString),0))

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.