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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
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??

1 Solution

Accepted Solutions
swuehl
MVP
MVP

=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
MVP
MVP

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

or

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