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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

average function

I have to find the average age of servers but the problem is some of the servers have negative numbers. Is there a way to get the averages only when the age_of_servers > 0??

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

=avg( if(age_of_servers >0, age_of_servers))

or

=avg({<age_of_servers = {">0"}>} age_of_servers)

View solution in original post

1 Reply
swuehl
Champion III
Champion III

=avg( if(age_of_servers >0, age_of_servers))

or

=avg({<age_of_servers = {">0"}>} age_of_servers)