How to calculate totel in datatable?

Hi @saninfo273

=> Read Range Workbook
image
Output-> dt
=> Use the below syntax in Assign:

Save to: dt
Value to Save: (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

=> Write Range Workbokok dt.
image

Sequence10.xaml (8.3 KB)

Hope it helps!!