Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
userpd_2021
Contributor III
Contributor III

How do I create variable toggle?

Hi ,

I am encountering a situation where I have to toggle the variable value using a two button.

Button A      Button B 

Global           General  

Chart1          Chart2

When we click on Button A we should be to see global ,Chart1 and Others should not be visible.

When we click on Button B the it should be general,Chart2 ,Others should not be visible.

How can this be achieved with using 1,0 as values?

 

Labels (3)
1 Solution

Accepted Solutions
MarcoWedel

Hi,

to toggle between variable values 1 and 0 with two buttons, you can just use the "set variable value" action on both buttons assigning either 1 or 0:

 

MarcoWedel_1-1640952072896.png

 

MarcoWedel_2-1640952087935.png

 

 

 

MarcoWedel_3-1640952115159.png

 

MarcoWedel_4-1640952128433.png

hope this helps

Marco

 

View solution in original post

4 Replies
MarcoWedel

Hi,

to toggle between variable values 1 and 0 with two buttons, you can just use the "set variable value" action on both buttons assigning either 1 or 0:

 

MarcoWedel_1-1640952072896.png

 

MarcoWedel_2-1640952087935.png

 

 

 

MarcoWedel_3-1640952115159.png

 

MarcoWedel_4-1640952128433.png

hope this helps

Marco

 

userpd_2021
Contributor III
Contributor III
Author

Hi Marco,

Thanks for the response , I can use values rather than 0,1 right it will give the same output.

MarcoWedel

yes, the assigned values don't have to be 1 or 0, they don't even have to be numeric.

userpd_2021
Contributor III
Contributor III
Author

Hi Marco,

Thank you !