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: 
VickyS
Contributor II
Contributor II

Toggle between two charts using one button

Hi Everyone,

I have two table charts. One shows values and other shows percentage.

I want to create one button which can allow me to toggle between these two tables.

Eg: If the name of button is values, when user clicks it should show all data in values, and when it is percentage, then it should show all data in percentage.

Request everyone to please help.

Labels (1)
1 Solution

Accepted Solutions
Rockstar7
Partner - Creator
Partner - Creator

@VickyS take a button and add an action like below

Rockstar7_0-1667925477676.png

and write button label below expression

 

=if(vShow=1,'Values','Percentage')

 

Now write show conditions to the tables of the container

Rockstar7_1-1667925539165.png

 

View solution in original post

4 Replies
Rockstar7
Partner - Creator
Partner - Creator

@VickyS  you can add two tables to a container, create a variable and add those variable in the show condition to toggle between the charts.

 

Rockstar7_0-1667628458754.png

 

VickyS
Contributor II
Contributor II
Author


@Rockstar7 wrote:

@VickyS  you can add two tables to a container, create a variable and add those variable in the show condition to toggle between the charts.

 

Rockstar7_0-1667628458754.png

 


Hi Rockstar,

Thank you for your response, but it seems the solution is not working.

Can you give example with screenshot, might it help.

I have already added two tables in container and linked them with variable. This is something that I did before raising this question, the issue is that i want the tables to be switched only by one button. 

For eg: if user clicks on button named Values then, value table showed show.

Once the table is displayed then name of button should change to percentage for the user to click for percentage values.

I think the solution is quite straightforward but i am lost in a way.

Please help.

 

Rockstar7
Partner - Creator
Partner - Creator

@VickyS take a button and add an action like below

Rockstar7_0-1667925477676.png

and write button label below expression

 

=if(vShow=1,'Values','Percentage')

 

Now write show conditions to the tables of the container

Rockstar7_1-1667925539165.png

 

VickyS
Contributor II
Contributor II
Author

Hi Rockstar,

Thanks a lot, this works perfectly fine. Thank you very much.

Much appreciated.

Regards,

Vicky