Skip to content

SUMX

The SUMX function in Infoveave calculates the sum of values in a column based on a specified condition.

Applicable to

  • Calculated Columns
  • Expressions

Return Value

The sum of values meeting the specified condition.

Remark

  • SUMX performs conditional sum calculations within datasets. It evaluates the condition for each row and sums values meeting the condition.
  • SUMX cannot be used across dates and strings.
  • SUMX ignores null and blank values.

Syntax

SUMX(<expression>,<condition>)

SUMX in Board Expression

ParameterDescription
ExpressionA placeholder replaced with actual widget and measure names.
ConditionA placeholder replaced with the condition filter.
Widget NameThe specific name of the widget used for data visualization in the Infoboard.
MeasureThe name of the measure displayed or analyzed using the widget.
DimensionThe dimension column displayed or analyzed using the widget.
Dimension ValueSpecific dimension items within the dimension column used for visualization.

Steps to Use SUMX

  1. Write the SUMX function. For instance SUMX(<expression>,<condition>)
  2. Replace <expression> with 'Widget Name'[Measure] and <condition> with [Dimension Name]="Dimension Value". Replace Widget Name, Measure, Dimension Name, and Dimension Value with your actual values.
  3. To learn how to configure an Expression in Infoveave, visit Configure Expression.

Scenario Managing a Solar Energy Dashboard to monitor the cumulative impact of solar and total customer numbers on a KPI. Calculate the product of solar customers (‘Solar Feed In’ dataset) and total customers (‘Solar Total’ dataset) to check if it surpasses a threshold.

Scenario Details

  • Dashboard Name Solar Energy Dashboard
  • Widget Name Solar Feed In
  • Measure Solar Customers
  • Dimension Discount Types
  • Dimension Value “Pay on Time”

Objective Track and analyze the performance of solar customers who pay on time, ensuring the count doesn’t exceed 20.

You can use the SUMX function like this

SUMX('Solar Feed In'[Solar Customers], [Discount Type]="Pay on Time") <= 20

SUMX in Calculated Columns

ParameterDescription
ExpressionA placeholder replaced with column names.
ConditionA placeholder replaced with the condition filter.
Column NameThe column name containing values you want to analyze.
Filter ConditionA filter condition (string or numeric) returning data points to analyze.

Steps to Use SUMX in Calculated Columns

  1. Write the SUMX function. For instance SUMX(<expression>,<condition>)
  2. Replace <expression> with [Column Name] and <condition> with [Column Name]="Filter Condition". Replace Column Name and Filter Condition with your actual values.
  3. To learn how to add calculated columns in Infoveave, visit Calculated Columns under Sources.

Objective Find the maximum entry value under MARKET PRICE where COUNTRY is Brazil.

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 SUMX function like this

SUMX([QUANTITY], [CATEGORY]="Cereal")

The new calculated column “Unit Sold” will return 17 (total rows considering nulls and blanks).

ORDER DATECOUNTRYCATEGORYUNIT PRICEMARKET PRICEQUANTITYUNIT SOLD
03-01-2024BrazilBaby Food38.4143.7874217
07-01-2024JapanSpices45.5650.81552017
Japan43.78741017
18-01-202432.3019417
22-01-2024BrazilCosmetics28.33523.0109717
26-01-2024Canada20.18523.0109917
04-01-2024FranceCereal25.2628.7964917
09-01-2024BrazilCereal44.57550.8155817
14-01-2024BrazilSnacks20.185417
BrazilCosmetics40.48546.1529217