RUNNINGSUM

Updated on

RUNNINGSUM is a DAX function that calculates a running total along a specified axis in a visual calculation data grid.

Syntax

RUNNINGSUM(
   Expression,
   Axis,
   Blanks,
   Reset
)
Argument Properties Description
Expression The expression to be evaluated for each row.
Axis Optional An axis reference.
Blanks Optional An enumeration that defines how BLANK values are ordered. Valid values are: DEFAULT, LAST, FIRST.
Reset Optional Specifies how the calculation restarts. Valid values are: None, LowestParent, HighestParent, or an integer.

Return Values

A scalar value, the running sum up to the current element of the axis.

Remarks

This function can be used in visual calculations only.

The axis, blanks and reset parameters can be omitted.

Example

Given a table that summarizes the total sales for each product category and calendar year, the following DAX query adds a column with the total sales for that category up to a given year.

SalesUpToDate = RUNNINGSUM([SalesAmount], Rows)

The screenshot below shows the visual matrix and the visual calculation expression:

DAX visual calculation

Other functions related to RUNNINGSUM are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/dax/runningsum-function-dax

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy