Returns the sum of all values in a set of numbers.

## Sample usage

`SUM(Quantity Sold)`

## Syntax

`SUM(X)`

### Parameters

- `X` - A numeric field or expression.

### Notes

- `X` cannot be an aggregated field or the result of an aggregation function.

## Example

Consider the following example. The data source contains a field called "Quantity Sold" with the number of items sold per purchase. Use the `SUM` function to compute the sum of these values.

| Example formula | Input | Output |
|---|---|---|
| `SUM(Quantity Sold)` | - 95 - 100 - 92 | 287 |

## Related resources

- [Calculated fields](https://docs.cloud.google.com/data-studio/about-calculated-fields)
- [Data Studio function list](https://docs.cloud.google.com/data-studio/function-list)