Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

hotitem
New Contributor

Dynamic set analysis

Hi, I have a question:

I have a data set which has a City dimension and a State dimension and a measure Sales.

I'd like to create a KPI which shows the State average sales for the state to which the City in the filter pane that has been selected belongs. So for example: if "San Francisco" is selected in the City filter pane, the KPI must show the average sales amount for California, if Houston is selected, then Texas, etc.

I know it can be done with set analysis, I just don't get the exact syntax.

Kind regards and thanks in advance!

Tags (1)
1 Solution

Accepted Solutions
Employee
Employee

Re: Dynamic set analysis

Try

Sum( {$<City=,State=P(State)>} Sales )

HIC

2 Replies
Employee
Employee

Re: Dynamic set analysis

Try

Sum( {$<City=,State=P(State)>} Sales )

HIC

hotitem
New Contributor

Re: Dynamic set analysis

Thank you! It works

Community Browser