Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Paknanarn23
Creator II
Creator II

How do I get the total value that is AVg in the table?


I want to get the total Average of column(1) when the value in column(1) is less than 20.

Paknanarn23_0-1678346654511.png


which i tried to code Like this, the value that comes out is not correct. What should I do?

Paknanarn23_1-1678346757900.png

 

 

2 Replies
Mark_Little
Luminary
Luminary

Hi 

Without the full details i can't give the exact answer, but how i would approach the problem would be

  1. Created Set Analysis that returns only the values above 20.
  2. Add Aggr function by the correct dimension to give you the total.
  3. Add Avg
  4. Work from there.
Paknanarn23
Creator II
Creator II
Author

I want that if the value of column1 is less than 20, show the total of column 1. The total of column 1 is the AVG value, and if the value of column 1 is greater than 100, then return its original value.