> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# sum()

<span id="atoti.array.sum" />

> @overload<br />
> atoti.array.sum(<br />
>     *value*: VariableColumnConvertible,<br />
>     /,<br />
> ) → JavaFunctionOperation

> @overload<br />
> atoti.array.sum(<br />
>     *value*: VariableMeasureConvertible,<br />
>     /,<br />
> ) → MeasureDefinition

Return a measure equal to the sum of all the elements of the passed array measure.

```pycon theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
>>> pnl_table = session.read_csv(
...     TEST_RESOURCES_PATH / "csv" / "pnl.csv",
...     array_separator=";",
...     keys={"Continent", "Country"},
...     table_name="PnL",
... )
>>> cube = session.create_cube(pnl_table)
>>> l, m = cube.levels, cube.measures
>>> m["Sum"] = tt.array.sum(m["PnL.SUM"])
>>> m["Empty sum"] = tt.array.sum(m["PnL.SUM"][0:0])
>>> cube.query(m["PnL.SUM"], m["Sum"], m["Empty sum"])
                          PnL.SUM      Sum Empty sum
0  doubleVector[10]{-20.163, ...}  -308.29       .00
```

### Parameters

<h4 id="atoti.array.sum.value">
  *value*
</h4>

> VariableMeasureConvertible
