How to calculate totel in datatable?

Hi @saninfo273

Please check this

(From d In DT.AsEnumerable
 Let t = {"KTN","KCN","KHC", "KCH","KHO","KSM","KTV"}.Sum(Function (x) Convert.ToInt32("0" & d(x).toString.Trim))
 Let ra = d.ItemArray.Take(d.ItemArray.Length - 1).Concat({t}).ToArray
 Select DT.Clone.Rows.Add(ra)).CopyToDataTable

Input:

image

Output:

Cheers!!