Skip to content

CUMMULATIVEX

  • The CUMMULATIVEX function in Infoveave is used to calculate the cumulative total of a numerical column, based on specified condition.
  • It computes the running total of the values in the column, where each row’s total includes the current row’s value plus the total from all previous rows, when the specified condition is set true.

Return Value

The return value of the CUMMULATIVEX function is a numerical column containing the cumulative totals for each row in the dataset, based on the specified condition.

Remark

  • The CUMMULATIVEX function is useful for calculating cumulative totals based on specific conditions, allowing you to analyze trends and patterns in data within certain criteria.
  • CUMMULATIVEX function is applicable only for numeric values.
  • It does not take nulls and blanks into account.

Syntax

CUMMULATIVEX(<expression>,<condition>)

CUMMULATIVEX in Board Expression

ExpressionA placeholder in a function that is replaced with the actual widget and measure names.
ConditionA placeholder in a function that is replaced with the condition filter.
Widget NameThe specific name or identifier of the widget being used for data visualization in the specific Infoboard.
MeasureRepresents the name of the measure that is being displayed or analyzed using the widget.
DimensionRepresents the dimension column that is being displayed or analyzed using the widget.
Dimension ValueRepresents the specific dimension items within the dimension column used for the visualization in the widget.

Steps to Use CUMMULATIVEX

  1. Write the CUMMULATIVEX function. For instance CUMMULATIVEX(<expression>,<condition>)
  2. Where expression equals 'Widget Name'[Measure] and condition equals [Dimension Name]="Dimension Value".Replace Widget Name with the actual name of your widget, Measure with the required measure name, Dimension with the required dimension name and Dimension Value with the dimension value of the selected dimension name.
  3. To learn how to configure an Expression in Infoveave, visit the section Configure Expression.

Scenario Imagine you are managing an Energy Dashboard, and you want to define a specific action based on a condition using Expressions. Let the condition to meet in this example be that you’re calculating the cumulative sum of customers and you want to trigger a specific action if this is greater than 7000000.

Scenario Details

  • Dashboard Name Energy Dashboard
  • Widget Name Total Customer
  • Measure Name Customers (representing the number of customers)
  • Dimension Discount Types (categorizing customers based on their payment behavior)
  • Dimension Value “Pay on Time” (representing customers who pay their bills on time)

You can use the CUMMULATIVEX function like this

(CUMMULATIVEX ('Total Customers'[Customers]),[Discount Type]="Pay on Time") > 7000000

CUMMULATIVEX in Calculated Columns

ExpressionA placeholder in a function that is replaced with the column names.
ConditionA placeholder in a function that is replaced with the condition filter.
Column NameThe name of the column in the dataset or Datasource that contains the values you want to analyze.
Filter ConditionA filter condition returns the data points that meet the defined condition that you want to analyze. The filter condition can be either a string or a numeric.

Write the CUMMULATIVEX function. For instance

CUMMULATIVEX(<expression>,<condition>)
  1. Replace <expression> with required [Column Name] and <condition> equals [Column Name]="Filter Condition"
  2. Replace Column Name with the actual name of your column and Filter Condition with the required condition to be applied on the columns.
  3. To learn how to add calculated columns in Infoveave, visit the section Calculated Columns under Sources.

Objective Consider that you have the below sales dataset, your goal is to find the cumulative sum of QUANTITY where COUNTRY is Japan.

ORDER DATECOUNTRYCATEGORYUNIT PRICEMARKET PRICEQUANTITY
2024-01-03BrazilBaby Food38.4143.78742
2024-01-07JapanSpices45.5650.815520
Japan43.787410
2024-01-1832.30194
2024-01-22BrazilCosmetics28.33523.01097
2024-01-26Canada20.18523.01099
2024-01-04FranceCereal25.2628.79649
2024-01-09BrazilCereal44.57550.81558
2024-01-14BrazilSnacks20.1854
BrazilCosmetics40.48546.15292

You can use the CUMMULATIVE function like

CUMMULATIVEX([QUANTITY] , [COUNTRY]="Japan")

The new calculated column “Cumulative Quantity” will be

ORDER DATECOUNTRYCATEGORYUNIT PRICEMARKET PRICEQUANTITYCUMMULATIVE QUANTITY
03-01-2024BrazilBaby Food38.4143.787420
07-01-2024JapanSpices45.5650.81552020
Japan43.78741030
18-01-202432.3019430
22-01-2024BrazilCosmetics28.33523.0109730
26-01-2024Canada20.18523.0109930
04-01-2024FranceCereal25.2628.7964930
09-01-2024BrazilCereal44.57550.8155830
14-01-2024BrazilSnacks20.185430
BrazilCosmetics40.48546.1529230