Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Totaling absolute values

Hello,

I have a chart that is calculating the variance between 2 numbers: Actual - Forecast. I am also calculating the Variance = Actual - Forecast. When i try to calculate the [Absolute Variance] = fabs(Actual-Forecast) , the numbers within the chart are correct, but the total does not sum up the absolute numbers and appears to still total based on the +/- numbers....

Any ideas how I can get the total based on the absolute numbers?

Thx!
Charis

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

You need to specify at what level of detail do you need the variance to get calculated. In your example, it needs to be done at the monthly level, so the accurate formula would be this:

sum(AGGR(sum(fabs(Actual-Forecast)), Month))

The more detailed do you want your calculation to be, the higher the absolute variance becomes...

View solution in original post

2 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

You need to specify at what level of detail do you need the variance to get calculated. In your example, it needs to be done at the monthly level, so the accurate formula would be this:

sum(AGGR(sum(fabs(Actual-Forecast)), Month))

The more detailed do you want your calculation to be, the higher the absolute variance becomes...

Not applicable
Author

Thanks Oleg! ... That was easy...