Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
tusharneral
Contributor
Contributor

sum and avg for particular column is showing zero.

I have a table with column score I need to calculate avg/sum for this column but its showing zero all the time.

Avg([score]) and sum([score])

but when I'm using count its working fine. only unexpected values are NULL and blank.

As I understand sum and avg ignore the NULL and blank values.

any suggestion to resolve this issue.

 

3 Replies
Kashyap_R
Partner - Specialist
Partner - Specialist

Hi 

Can u elaborate your requirement if it is possible can u please attach the output image or excel

If your requirement is Avg value by the sum of all value then 

Avg (Value)/Sum(All Value)

If your requirement is Sumvalue by the Avg of all value then 

Sum(Value)/Avg(All Value)

Hope this helps

Thanks

Thanks and Regards
Kashyap.R
tusharneral
Contributor
Contributor
Author

Hi,

both are separate in one chart I'm trying to do sum and other i'm doing avg

jonathandienst
Partner - Champion III
Partner - Champion III

Cant really answer the first part, but maybe this will help:

Sum - will add the non-null numerics. Blanks and nulls treated as 0.

Count - will count all the non-nulls, includes blanks and text

Avg - the sum divided by the count of numeric values (blanks are not numeric)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein