Apama 10.15.0 | Building and Using Apama Dashboards | Dashboard Function Reference | Tabular Functions | Add Columns
 
Add Columns
Returns a table that includes a column reflecting the sum of two specified columns of a specified table, the sum of a specified value and a specified column, or the sum of two specified values.
Usage notes
*Case 1: Sum of two specified columns of a specified table. This is the case if First Column Name or Numeric Value and Second Column Name or Numeric Value both specify a column of Table.
*Case 2: Sum of a specified value and a specified column. This is the case if one of First Column Name or Numeric Value and Second Column Name or Numeric Value specifies a column of Table and the other specifies a numeric value.
*Case 3: Sum of two specified values. This is the case if First Column Name or Numeric Value and Second Column Name or Numeric Value both specify a numeric value.
In case 1, the nth cell in the returned column corresponds to the nth cell of the table specified by the argument Table. Each cell of the returned column contains the result of adding the corresponding row's cell in First Column Name or Numeric Value to the cell in Second Column Name or Numeric Value.
In case 2, the nth cell in the returned column corresponds to the nth cell of the table specified by the argument Table. Each cell of the returned column contains the result of adding the corresponding row's cell in the specified column to the specified numeric value.
In case 3, each cell of the returned column contains the sum of the two specified numeric values.
In the returned table, the sum column is preceded by copies of all the columns in Table.
Arguments
The function has the following arguments:
*Table: Table that contains the columns to be summed.
*First Column Name or Numeric Value: Text string specifying the first column to be included in the sum, or numerical value to be included in the sum.
*Second Column Name or Numeric Value: Text string specifying the second column to be included in the sum, or numerical value to be included in the sum.
*Result Column Name: Text string that specifies the name of the column containing the sums. You must supply a value for this argument.
This function returns a table.