AddingDataColumn

Hi. I used Add Data Column activity. I wrote the sum of the values in the other two columns with the formula in this column. Finally, I wanted to get the sum of the values in the newly created column with a Linq query. I didn’t write it because I was sure that this query worked. Because it adds up the other columns. However, when I collect my new column, it is not the values written in the cells. It collects the value found as Default in the Add Data Column activity. How do I solve this problem?

@Ali_Osman_Kaya
would you please share sample input and output

@Ali_Osman_Kaya

Try this:

Assign activity:
totalSum = 0

For Each row In yourDataTable.Rows
totalSum = totalSum + Convert.ToDouble(row(“YourNewColumn”))

In this code, yourDataTable is the name of your DataTable, and “YourNewColumn” should be replaced with the actual name of the new column containing the calculated values.

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