Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

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

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: Building a KPI of a category based on current selection

maybe

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

2 Replies
MVP
MVP

Re: Building a KPI of a category based on current selection

maybe

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

Not applicable

Re: Building a KPI of a category based on current selection

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.