Qlik Community

Qlik Sense App Development

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

Not applicable

2 KPIs in 1 map

hey,

i have two KPIs called kpi1 and kpi2. for both i have one map based on a zip-area.

but i want to have only one map and a switcher for my choice between kpi1 and kpi2.

is it possible in Qlik Sense?

best regards

1 Solution

Accepted Solutions
utkarshgarg
Contributor II

Re: 2 KPIs in 1 map

Yes. Use this extension :

asierfer/QlikSense-Ext-VariableButton · GitHub

This will provide you buttons using which you can assign upto 5 expressions.

Assign different expressions to different buttons and then use if statements in the map expression.

Check out the attached app. But first install the extension.

5 Replies
MVP
MVP

Re: 2 KPIs in 1 map

This is not the "typical" use of Qlik Sense, so I'd say it's not something that can be done easily out of the box. The following can be used as a work around, with some limitations:

1. Create a separate field that could hold 2 values with the KPI names - KPI1 and KPI2. Add a Filter pane that allows the user to select one KPI or another.

2. In the Measure definition of your map, create a condition expression that selects one or the other calculation based on the selected value of the KPI field:

IF (KPI = "KPI1", <calculate something>, <calculate something else>)

Caveats: currently, there is no way to require that a single value is selected in the Filter pane.

cheers,

Oleg Troyansky

www.masterssummit.com - take your QlikView skills to the next level!

utkarshgarg
Contributor II

Re: 2 KPIs in 1 map

Yes. Use this extension :

asierfer/QlikSense-Ext-VariableButton · GitHub

This will provide you buttons using which you can assign upto 5 expressions.

Assign different expressions to different buttons and then use if statements in the map expression.

Check out the attached app. But first install the extension.

tap
Contributor

Re: 2 KPIs in 1 map

Yes, you can create an "data island" of the values you want for the switcher - then tie the measure into the value of this selection.

Attached is an example showing you how to switch between 2 different KPIs based on some random data on UK postcodes.

Not applicable

Re: 2 KPIs in 1 map

you use two dimensions for the filter. but i have 2 kpis and so i think this is not a solution for my problem!?

Not applicable

Re: 2 KPIs in 1 map

great solution. thanks

Community Browser