diff --git a/src/modules/pivotTable/PivotTableEngine.js b/src/modules/pivotTable/PivotTableEngine.js index ff91360e8..104e98aaf 100644 --- a/src/modules/pivotTable/PivotTableEngine.js +++ b/src/modules/pivotTable/PivotTableEngine.js @@ -1088,10 +1088,15 @@ export class PivotTableEngine { column, }) const valueType = dxDimension?.valueType || VALUE_TYPE_TEXT + const totalAggregationType = + dxDimension?.totalAggregationType // only accumulate numeric (except for PERCENTAGE and UNIT_INTERVAL) and boolean values // accumulating other value types like text values does not make sense - if (isCumulativeValueType(valueType)) { + if ( + isCumulativeValueType(valueType) && + totalAggregationType === AGGREGATE_TYPE_AVERAGE + ) { // initialise to 0 for cumulative types // (||= is not transformed correctly in Babel with the current setup) acc || (acc = 0)