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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating an average from chart expressions

Hi,

I've created several expressions from which I need an overall average.

The sum expression I've created is a simple addition:

Expression1 + Expression2 + Expression3 .........

However, the expression only gives a value if all the expressions have a value.  How do I get a total/average if any of the constituent expressions is missing?

Any help on this gratefully received,

Racine62

1 Solution

Accepted Solutions
maxgro
MVP
MVP

look at alt function

the result of alt(null(), 0) is 0

or at the rangesum function

from online help

rangesum(expr1 [ , expr2, ... exprN ])

Returns the sum of a range of 1 to N arguments. As opposed to the + operator, rangesum will treat all non-numeric values as 0.

View solution in original post

3 Replies
marcus_malinow
Partner - Specialist III
Partner - Specialist III

try using

rangemax(Expression1, 0) + rangemax(Expression2,0) etc.. etc...

maxgro
MVP
MVP

look at alt function

the result of alt(null(), 0) is 0

or at the rangesum function

from online help

rangesum(expr1 [ , expr2, ... exprN ])

Returns the sum of a range of 1 to N arguments. As opposed to the + operator, rangesum will treat all non-numeric values as 0.

Not applicable
Author

Thanks for this,

Racine62