# SUM

The SUM function returns the total of all numbers provided in the arguments by adding them together. The inputs can be numeric values or node references. This function is commonly used to calculate totals, aggregates, and overall values in datasets.

### Syntax

```javascript
SUM(value1,[value2]....)
```

### Arguments

value1 – The first node or number to be added (Required).&#x20;

value2,...– The additional nodes or numbers to be added (Required).

### Example

```javascript
SUM(COLUMN1, COLUMN2)
```

In the example below, the *SUM Values* measure is created using the **SUM** function, which returns the result of adding *MEASURE 1* and *MEASURE 2*.

<figure><img src="/files/vtvNtflW9q9UGs7fG8Ur" alt=""><figcaption><p>Applying SUM function</p></figcaption></figure>

### Excel equivalent

[SUM](https://support.microsoft.com/en-us/office/sum-function-043e1c7d-7726-4e80-8f32-07b23e057f89)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.inforiver.com/formula-syntax/math-functions/sum.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
