Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
louise119
Creator III
Creator III

Switch table A and table B with button

I want to switch table A and table B created by script between table A and table B with a button or something on the same place. just  switch the table . Is it possible ?

 

switch.png

switch2.png

  

1 Solution

Accepted Solutions
justISO
Specialist
Specialist

Hi, first you need to create a variable. This can be done in script with 'LET vVariable=0' line, or just in report level, left bottom corner -> 'Variables' and 'Create new'. Lets call it 'vVariable'.
Now in your Button you need to create new action, choose 'Set variable value' as action, your vVariable as variable and enter expression as Value: =if(vVariable=0,1,0) You basically switch with it between 1 and 0.
Now in report add 'Container' chart and drag/add both of your tables into it. Under 'Show condition' of each of your tables enter expressions =vVariable=0 and =vVariable=1 accordingly. Under Container appearance tab, turn of 'Tabs'.
Thats it, you can switch between 2 tables with a button.

View solution in original post

2 Replies
justISO
Specialist
Specialist

Hi, first you need to create a variable. This can be done in script with 'LET vVariable=0' line, or just in report level, left bottom corner -> 'Variables' and 'Create new'. Lets call it 'vVariable'.
Now in your Button you need to create new action, choose 'Set variable value' as action, your vVariable as variable and enter expression as Value: =if(vVariable=0,1,0) You basically switch with it between 1 and 0.
Now in report add 'Container' chart and drag/add both of your tables into it. Under 'Show condition' of each of your tables enter expressions =vVariable=0 and =vVariable=1 accordingly. Under Container appearance tab, turn of 'Tabs'.
Thats it, you can switch between 2 tables with a button.

louise119
Creator III
Creator III
Author

Thank you so much!
It really helpful!