Sum

Sum is a mathematical function that returns the summation of a group of numeric values, rows, columns, or cells.

The syntax for the Sum function:

Sum (arguments)

where arguments is one or more of these arguments:

Argument

Description

numeric

A numeric value. For example, Sum(10, 20, 30) returns the value 60. Numeric values can include decimals and negative values.

row, column, or cell reference

A pointer to a row, column, or cell within a grid. References can be specified in several ways. The reference syntax: GridName.GridElement[segment(range)].property

function

An embedded function

Examples:

  • The following example returns the value 30:

      sum(10,20)
  • The following example returns the sum of three rows:

      sum(row[1],row[6],row[8])
  • The following example calculates the sum of three aggregate columns:

      sum(column[E], column[G], column[I])

When a formula row includes IDESC, the sum includes all of the parents and their descendants.

For example, a form is created with the following rows (and each member has children):

IDESC("Mem1"), IDESC("Mem2"), IDESC("Mem3"), IDESC("Mem4")

If a formula row is added with the following formula:

SUM(ROW[1],ROW[2],ROW[3],ROW[4])

When the form is opened for data entry, the formula row will return the sum of all the parents and their children.