Sum
SUM function adds all numbers in fields and/or table column/row and returns the result.
Syntax
SUM(number1, [number2],...)
For example:
=SUM([Price 1], [Price 2])
=SUM([Field 1] + [Field 2])
=SUM([Field 3], [Field 4], 2)
Argument name | Description |
---|---|
number1 (Required) | The first number you want to add. The number can be like 4, a field reference like [Price 3], or a table range like [Pricing]![4][1]:[4][10] |
number2 (Optional) | This is the second number you want to add. You can add as many values as you need. |
Examples
Create three separate fields with the following values in the Default Value property.
Create a table with one column and three rows with the following in the Default Values of the column.
Field | Default Value |
---|---|
Field 1 | -5 |
Field 2 | 15 |
Field 3 | 30 |
Formula | Description | Result |
---|---|---|
=SUM([Field 1], [Field 2]) =[Field 1] + [Field 2] | Adds Field 1 and Field 2 together | 10 |
=SUM([Field 3], [Field 1], 10) =[Field 3] + [Field 1] + 10 | Adds Field 3 and Field 1 first, and then adds 10 | 35 |
Using SUM in tables
Column 1 | Column 2 |
---|---|
10 | 5 |
12 | 7 |
15 | 9 |
Formula | Description | Result |
---|---|---|
=SUM([Table]![1][1]:[1][3],[Table]![2][1]:[2][3]) | Sums column 1 and column 2 | 58 |
=SUM([Table]![1][1]:[1][3],15) | Adds the values in the top three rows of the first column of the table, and then adds 15 | 37 |
Updated almost 2 years ago