Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
johnnyjohn
Creator
Creator

Toggle Variable value using checkbox

Hi, 

I've been struggling with this insane topic, which should be incredibly simple but the implementation of it is really strange. 

I wanna show a metric if a checkbox is ticked and another if the checkbox is unticked, i.e. IF(BoxTicked = -1, Sum(sales), Avg(sale)). 

Alternatively, if I can see a variable value if the checkbox is ticked (e.g. set a variable myVar = -1), if it's un-ticked, set myVar = 0. That way in the metric I can just do IF(myVar = -1, Sum(sales), Avg(sale)). 

Any of those implementation would fulfill my requirement.

The native button in Qlik doesn't work, because it's a button, not a switch or a checkbox. I have Field UI and SimpleFieldSelect, but can't find a way to do what I'm describing above.

Any help please? 

Labels (2)
2 Replies
Mark_Little
Luminary
Luminary

 HI @johnnyjohn 

Qlik have a supported extention that allows toggles.

Custom Objects > Qlik Dashboard Bundle > Variable Input

johnnyjohn
Creator
Creator
Author

I suppose you are referring to the "Buttons" in that extension, as opposed to drop down, input box, or slider.

Could you explain how to implement the above using that extension? I.e. toggle a variable value based on the state of the checkbox/toggled element?