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: 
lpenya31
Contributor III
Contributor III

funcion sum with one dimension

Hi!

I'm trying to create this table on qliksense, but it seems I'm not able to find the right formula to calculate the average category price, without filtering by the products that you have in the second row. 
 
I would like to create a formula that just takes into account the category (product category) but not the single product, in order to calculate the average price by category, not by product.
 
I have been trying the following formula but it doesn't work for me:
 
avg(total<ProductCategory>if(ProductPrice>0,ProductPrice))
 
Thank you for your help! 
Labels (1)
1 Solution

Accepted Solutions
stevejoyce
Specialist II
Specialist II

does this work for you:

avg(total<ProductCategory> {<ProductPrice={">0"} >} ProductPrice)

View solution in original post

3 Replies
stevejoyce
Specialist II
Specialist II

does this work for you:

avg(total<ProductCategory> {<ProductPrice={">0"} >} ProductPrice)

lpenya31
Contributor III
Contributor III
Author

Hello Stevejoyce 

I have tried your formula but it does not calculate anything for me.

 

stevejoyce
Specialist II
Specialist II

Are you getting any syntax issue?  Not sure if your field names are different then what you posted.

 

Can you post a sample data set.  This should work.