> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# CumulativeAvg

> Use the Sigma CumulativeAvg function to calculate the numerical average of the input column up to and including the current value.

The **CumulativeAvg** function calculates the numerical average of the input column up to and including the current value.

## Syntax

```
CumulativeAvg([Column])
```

Function Arguments:

* **\[Column]** (required) - The column of numbers to evaluate the cumulative average.

## Notes

* Cumulative functions depend on the order of the given column. If you change the sort order, the result in each row changes.

## Example

```
CumulativeAvg([Monthly Revenue])
```

In a table that contains the monthly revenue of a store, the **CumulativeAvg** function can be used to find the average up to and including the current .

![A table with two columns, monthly revenue and cumulative average, shows the average of revenue up to and including each month. The first three rows of monthly revenue and the line representing their cumulative average are highlighted by boxes](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/873b27de0e7ce212a889fabe2e2e4a199b50a5d598f0c4bad8204ed0fe768979/assets/docs-images/74cd7f913227b96ef3d66e066bf157b3cd861e8f0d9e51ef7161ae96277ccdf1-cumulativeavg_example_1.png)

In row three of this example, the value highlighted in the column **CumulativeAvg of Monthly Revenue** is `150000`. This is the average of the values in the column **Monthly Revenue** up to and including the value in row three. The average is calculated as `(100000 + 200000 + 150000) / 3 = 150000`.

![A table with two columns, monthly revenue and cumulative average, shows the average of revenue up to and including each month. All rows of monthly revenue are highlighted, along with the line representing their cumulative average](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/a192658f70025fa98af4b667d8ff6502c69350584806718e04192a537dd543d8/assets/docs-images/9ac9e0008a379321c516c4e1f42c06e6376e510136378314ee8d2158ba3d1d62-cumulativeavg_example_2.png)

In the final row of this example, the value highlighted in the column **CumulativeAvg of Monthly Revenue** is `125000`. This is the average of all values in the column **Monthly Revenue**. In this example, the average is calculated as `(100000 + 200000 + 150000 + 175000 + 125000 + 0) / 6 = 125000`.

## Related resources

* [Avg](/docs/avg)
* [MovingAvg](/docs/movingavg)