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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to code a sum with only values above certain value?

Hello,

   I been trying for a while now and cant find a way to discriminate certain values of a table. To make it short, I want the sells average of products with a sell above $50,000. Example:

  

ProductsSells
Product 110,000
Product 260,000
Product 370,500
Product 445,000
Product 550,200
Expected result        60,233

This result come from (Product 2+Product 3+Product 5)/3

Thank you in advance.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try something like this in a text box:

=Avg( {<ProductField = {"=sum(SellingField)>50000"}>} Aggr( Sum(SellingField), ProductField ))

Replace ProductField and SellingField with your appropriate field names.

View solution in original post

2 Replies
swuehl
MVP
MVP

Try something like this in a text box:

=Avg( {<ProductField = {"=sum(SellingField)>50000"}>} Aggr( Sum(SellingField), ProductField ))

Replace ProductField and SellingField with your appropriate field names.

Not applicable
Author

Thanks a lot!!!! it worked perfectly