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

Averaging fields in a table

Hi,

I got a table as below, I want to average those values

Eg: avg(A), avg(B)


but if I got a N/A figure on the column I want to avg only the values

Eg: In column B I want to avg values 10, 8, 8

In column C I want to avg values 5, 0, 7

Can any one tell me how do I do it, Thanks in advance...

A109108
B10N/A88
C5N/A07
8 Replies
anbu1984
Master III
Master III

Are A,B,C field names or 3 different rows?

Not applicable
Author

Hi Mazaf,

Do you want a total?

or these values are in the field?

By default qlikview take the avg of the values which are present

I mean: for B (10+8+8)/3

with Reagrds

harshita Gaur

anbu1984
Master III
Master III

Load Avg(A),Avg(B),Avg(C) Inline [

A,B,C

10,10,5

9,N/A,N/A

10,8,0

8,8,7 ];

Not applicable
Author

see the attached file

Not applicable
Author

Hi Harshita,

I want avg not total but if the field had a values 'N/A' I want skip that field and avg other figures

in your example you haven't mentioned 'N/A' in the field

Not applicable
Author

did you check the attached qvw. qlikview by default generate the avg of field which has values

Regards

harshita Gaur

Not applicable
Author

Hi mufaz,

if you don't get the values then try this

=sum(A)/count( {<A-={''}>}A)

With Regards

Harshita Gaur

Not applicable
Author

see the attached file