Sum of rows and fill output into another column

I want to sum the 2 columns and put the output into a new column.

Can anyone help me what to use ?

Hi, @Soniya215,

  1. You can create a new column for the Total using “Add data Column” activity.
  2. Use For each row for the datatable and update the column value “Total” using assign activity.

row(“Total”) = Convert.ToString(Int32.Parse(Convert.ToString(row(“Column1”)))+Int32.Parse(Convert.ToString(row(“Column3”)))+Int32.Parse(Convert.ToString(row(“Column4”))))

At the end of the loop, you will have the datatable as required.

Happy Learning! :slight_smile:

Demo Xaml here: Soniya215_ColSum.xaml (8.8 KB)

Implemented Logic for the sum: Skip first Column and sum up dynamicly remaining row columns (8.9 KB)
cheers @Soniya215

Main.xaml (8.3 KB)

Thanks a lot for your help . @ppr @Pradeep_Shiv @Vince I got the result. :slight_smile:


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