Totals for a calculated field is incorrect


In the image you can see the dark blue values where the “Total” for the WTD Delta uses “Sum” in the totals section. The WAPE calculation which involves the WTD Delta still uses the “Default” for the “Total” calculation. How can I make sure that the totals tie off with the other values in the totals. Meaning, we should get 5861/81896.61 = 7.16%, but instead we’re getting the calculation where it takes the “Default” sum calculation for both the numerator and the denominator.

WTD Delta : same as ({[Weekly] WK-4 Cumulative Delta - Node })

abs(

runningSum(

sum({WK-4 Delta}),

[{Metric Date} ASC],

[{Reporting Week}, Node]

))

WTD WAPE :
({[Weekly] WK-4 Cumulative Delta - Node })/runningSum(

sum(Actuals),

[{Metric Date} ASC],

[{Reporting Week}, Node]

)

testing :
runningSum(

sum(Actuals),

[{Metric Date} ASC],

[{Reporting Week}, Node]

)

Hello @gmikay, I wonder if it is struggling to aggregate each individual runningSum in the total before running the division aggregation. How is the runningSum aggregating in relation to the image you highlighted above?

Alternatively, have you tried updating the total calculation from Default to Sum for the WTD WAPE function?

RunningSum works fine, and yes I’ve tried using SUM for WTD Total aggregation but this just sums up all the row values. The issue is that the numerator is incorrect here, it uses “Default” total rather than the “Sum” total that I’ve selected in its own column, is there any work-around

Hello @gmikay, I understand that the runningSum works fine, but what are you using it for? I can’t tell from the screenshot how it impacts the values that are displayed in the row.

Is the Node field being used as the Row value and the Reporting Week field used as the column value? Also, where is the Metric Date field being used in the visual? It is difficult to provide a solution, when I can only see a portion of the pivot table.

runningSum() is used as the denominator and numerator for the WTD WAPE calculation. The table format is as follows

Rows : Node
Columns: Reporting Week, Metric Date (Reporting week contains 7 metric dates)
Values: WTD Delta (numerator), WTD WAPE (WTD DElta / testing), testing (running sum of the actuals).