# 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 number or node reference to add.
* `value2, ...` (Optional): Additional numbers or node references to add.

#### Return value

Returns the total of the specified values.

#### Example

```javascript
SUM(Q1.Actuals Contoso, Q2.Actuals Contoso, Q3.Actuals Contoso, Q4.Actuals Contoso)
```

In this example, the *Total Actuals* measure is created using the SUM function, which returns the sum of the quarterly *Actuals* values for Contoso.

<figure><img src="/files/KUyEmF82Nuk8LvqrIeQE" alt=""><figcaption></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.fabricplan.com/planning-sheets/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.
