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

Kpi Should update based on alternate measure selection in column chart/bar chart

Hi Friends,

I have a qlik sense app where I have a KPI and bar chart objects. Kpi  has an expression  Count(distinct [Contract Code] ).  Bar chart display two measures  Count(distinct [Contract Code] ) and count(InExecuted) and user can switch between them as below.

zjdoonj_0-1639661304958.png

Now when user selects "count of Contracts" measure on bar chart kpi updates correctly and shows correct count but when they select "Time To Close Executed" kpi still shows count of contracts. Is that possible if what ever measure user select in bar chart kpi should display value for that particular measure dynamically?

 

Please advise.

Thanks,

4 Replies
Or
MVP
MVP

Using alternative measures, you can't do this, as they only impact the object they're in.

You could create a dynamic measure using a filter or a variable to get the same functionality. Assuming you have a new field called MeasureType for this, and you've added it as a filter to your app, your expression might then be e.g.

If(MeasureType = 'Time To Close Executed',count(InExecuted),Count(distinct [Contract Code] ) )

The field can be created with a simple inline load:

Load * INLINE  [

MeasureType

Time To Close Executed

count of Contracts

];

zjdoonj
Contributor III
Contributor III
Author

Hi Master II,

Not sure if I understood. What is MeasureType here? also can we achieve this on the user interface rather updating the script? can you please explain?

Or
MVP
MVP

MeasureType is a new field that will control which measure is displayed in your objects.

You could do this in the front end by using a variable and an input which would allow the user to change it. You'd then use the contents of that variable similar as you would MeasureType.

zjdoonj
Contributor III
Contributor III
Author

Hi Master II,

Please list the steps in sequence because I am not able to achieve it as per your suggestions above.

Thanks