How to calculate total?

How calculate sum of total below datatable…

Unit TN CN HC CH HO SM CB KM MH Total
1-30 0.067817008 0.062174952 0.780147434 1.4210211 0.06174 0.923536262 2.024384096 0 1.173270112
30-60 0.0084672 0.01292592 0.011495 0.679251706 0.05530112 0.786329264 0.543732924 0.777522864
60-120 0.296024382 0.282708174 0.076847568 0.910708064 0.036481088 2.85786414
Total 0.375345166 0.357809046 0.916687522 3.01098087 0.11704112 1.709865526 5.508738467 21.30802436 4.031134252

Hi @domsmgtmeet22

Check this thread,It might helps you

Hope it helps!!

HI,

Can you try the following sample?

Dim arrCol As String() ={"TN","CN","HC","CH","HO","SM","CB","KM","MH"}
dt.AsEnumerable.ToList.ForEach(Sub(r)
r("Total")=arrCol.Sum(Function(s) If(Double.TryParse(r(s).ToString,New Double),Double.Parse(r(s).ToString),0))
End Sub
)

Sample
Sample20240509-5.zip (18.0 KB)

Regards,

how to use assign activity ??

Is not working share another code