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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with absolute sum

HI

I have a table in qlikview that looks like

Needed Working Variance

Tellers 5 4 -0.25

Enquiries 3 1 -2

Sales 2 2 0

needed has =sum(needed)

working has =sum(working)

variance = (sum(working)-sum(needed))/sum(Working)

what I need so What I need is to get the absolute sum of the variance as in ABS(-0.25 + -2 + 0) = 2.25

How do I achieve this in qlikview

3 Replies
suniljain
Master
Master

convert each element of expression to absolute by fabs()

Not applicable
Author

I've tried this and I'm still not getting any joy

Fabs((Sum(Working)-Sum(Needed))/Sum(Working))



Or
MVP
MVP

Try:

Sum(fabs((Working-Needed)/Working))

From a mathematical standpoint, you can't sum each part individually - if you do, you lose the variance.