sisense.com
✅ You are viewing documentation for the latest version of Compose SDK.
Version:

Function runningSum

runningSum( measure, _continuous?, name?): CalculatedMeasure

Creates a calculated measure that calculates the running total of a given measure.

The running sum is calculated using the current sort order of the query it's used in.

Parameters

ParameterTypeDescription
measureMeasureMeasure to apply the running sum to
_continuous?booleanBoolean flag whether to accumulate the sum continuously
when there are two or more dimensions. The default value is false.
name?stringName for the new measure

Returns

CalculatedMeasure

A calculated measure instance

Example

Calculate the running sum of the total cost from the Sample Ecommerce data model across all categories.

measureFactory.runningSum(measureFactory.sum(DM.Commerce.Cost)),

Running sum values from the Sample Ecommerce data model when categorizing by age range.

AgeRangeCostRunning Cost
0-184.32M4.32M
19-248.66M12.98M
25-3421.19M34.16M
35-4423.64M57.8M
45-5420.39M78.19M
55-6411.82M90.01M
65+17.26M107.27M
Last Updated: