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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
fishing_weights
Creator
Creator

Master Variable to control multiple variables across many sheets

I have a few variables controlling different objects on my dashboard to show or hide them across multiple sheets.

Example:

vShow_object1 

vShow_object2

vShow_object3

x 10

then i set the condition in the objects if vShow_object1 = 1 under conditioning

is there a way to create a master variable then can "reset" all of them to 0 something like if vMaster_control = 0 then 

vShow_object1 =0,vShow_object2=0,vShow_object3=0

or is the only way by slowly adding vshow_object at a time to a single button under actions...

Labels (2)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

What if you have one single master control variable and one object control variable per object that you want to control. Then you define the show condition as the product of the two. If any of the two are 0 then the product is 0 and the object will not be shown.

vMasterControl = 1|0

vObject1Control= 1|0

vObject2Control= 1|0

vObject3Control= 1|0

...

vShow_object1 = vObject1Control * vMasterControl

vShow_object2= vObject2Control * vMasterControl

 

vShow_object3= vObject3Control * vMasterControl

View solution in original post

4 Replies
Vegar
MVP
MVP

What if you have one single master control variable and one object control variable per object that you want to control. Then you define the show condition as the product of the two. If any of the two are 0 then the product is 0 and the object will not be shown.

vMasterControl = 1|0

vObject1Control= 1|0

vObject2Control= 1|0

vObject3Control= 1|0

...

vShow_object1 = vObject1Control * vMasterControl

vShow_object2= vObject2Control * vMasterControl

 

vShow_object3= vObject3Control * vMasterControl

fishing_weights
Creator
Creator
Author

Thanks! this would require setting up an additional layer of variables and condition as I need to control them separately as well..

From ChatGPT I found this solution which works for me. but thank you any way..

 

  1. Create triggers: Go to the 'Settings' tab of the Variable Overview window and click on 'Triggers'. Create a new trigger for vMasterVariable by clicking on the '+' button. Select the appropriate trigger event, such as 'OnChange' or 'OnSelect'. In the Actions section, select 'Variable Set' and specify the actions you want to perform when the master variable changes. For example, you can set the value of vVariable1 and vVariable2 based on the value of vMasterVariable.

  2. Control the variables independently: Users can still manually change vVariable1 and vVariable2 independent of the master variable. These variables will retain their values until the master variable is changed, in which case the conditional statements will be re-evaluated.

Vegar
MVP
MVP

@fishing_weights 

Are you using QlikView or Qlik Sense? The ChatGPT solution looks like something that is only possible to do in QlikView and  not in Qlik Sense.

fishing_weights
Creator
Creator
Author

I'm using QlikView. But you bring up a good point as I'll be switching to Qlik Sense in the following year or so. Which means from the get go once I start building my dashboard in Qlik Sense I've to structure it as you advise