In a formula-type column, the SUM_ELEMENTS function adds up the numerical values of a column, including columns containing multiple values separated by commas, notably fields of the Linked Table Column type. It returns a number. Some tools use the term "Rollup" for an equivalent function.
- $field_name = field (link, linked table column, number, selection, formula, text...).
- "free text" = free text to add within quotes.
- do not use quotes for numbers.
Syntax
Parameters
The output format of the result (number, currency, percentage...) is configured in the output field options of the formula editor. See Output format options in the Formula Column article.
Examples
Add up the costs from a linked table
A timesheets table (hours and costs) is linked to a projects table. The Cost from timesheets column is a linked table column that brings up the costs from each row. To get the total project cost, the column returns the total costs of all timesheets linked to the project.
The sum also works on text-type columns, Link to another table, or Linked Table Column, as long as they contain numerical values. You can hide the intermediate column (here Cost from timesheets) so it is not displayed to the end user.
Go further
SUM
The simple version to add up regular columns, without a linked table.
Or continue with
Formula glossary
All available operators and functions, sorted by category.