> 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.

# CumulativeCount

The **CumulativeCount** function counts the number of non-null values of a column, up and including the current row value.

## Syntax

```
CumulativeCount([Column])
```

Function Arguments:

* **\[Column]** (required) - A column of text, numbers or dates to count the number of non-null values up to and including the current row value.

Cumulative functions depend on the order of the given column. If you change the sorting, you change the result.

## Example

```
CumulativeCount([Number of Violations])
```

A table contains data for restaurant inspections by day.  The **CumulativeCount** function can be used to count the amount of days with at least one violation up to and including the current day.

![](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/62d507d53b3ea1b14a5a1f1e1fae7711a772e03423411124bd2a5005cea9a3a1/assets/docs-images/ca31e4c-5555.png)

## Related resources

* [Count](/docs/count)
* [MovingCount](/docs/movingcount)