Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Building a KPI of a category based on current selection

Hi community,

I'd like to build a kpi that shows sales of a product category, based on the current selection of a product.

e.g. Selecting "Salad", I want that my kpi returns the sales of the product category "Vegetables", while selecting "Milk" my kpi should return sales of the "Dairy products" category.

How can I solve that?

Thanks for the support,

Carlo

1 Solution

Accepted Solutions
maxgro
MVP
MVP

maybe

sum({$ <product=,productcategory=p(productcategory)>} sales)

View solution in original post

2 Replies
maxgro
MVP
MVP

maybe

sum({$ <product=,productcategory=p(productcategory)>} sales)

Not applicable
Author

Thanks, it seems to work.

Could you tell me how the expression you suggested works exactly (or where I can find out more about it)?

I cannot understand it completely.

Furthermore I'm don't get what the kpi measures when no selection is made, because it doesn't seem to be equal to sum(sales), and also when multiple selection is made.

This expression is going to be very helpful for many different calculations.