Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to change graph expression/dimension with button?


I have a question which is quite complicated for me.

I want to be able to change between graphs (in this case line graphs). I have two sets of Data:

1. Inflation data with time periods (year) and countries.

2. Labour Rate data also with time periods (year) and countries.

Ideally I would like to press a button that changes the graph from one set of expression to another - that way I only need one graph.

The dimensions for now are the same (year and then country) just that the expression for the two graphs are different (sum of Inflation data VS sum of Labour Rate Data)

Is there a way to do this? I'm attaching a photo.

Please also note that i'm not a coder/techie


8 Replies

Hi Yahya,

just add a condition based on either the value of a variable (button) or the output of Getfieldselections() (inline listbox for selection) to any dimension or expression that you want to use in the graph. There is an edit_field for each in the dialog.

That way, you can use that listbox or button to change which dimension(s) or expression(s) your graph uses.


Best regards,



You can create a variable with button action to change between 0 and 1 (If(vVar = 0, 1, 0)). The way the if statement is structured the value of vVar will swap between 0 and 1. So now you can use expression condition for your set of expressions like this vVar = 0 and vVar = 1. If you need more sets you can do like this(If(vVar = 0, 1, If(vVar = 1, 2, 0))).

I hope this will help.



Not applicable

hi sunny, thanks so much for your help, but i'm really sorry its quite advanced for me. could we do this a little slower? i could send you a private message/email    


Sure we can

Not applicable

send me a message? i can't unfortunately for some reason    


You need to follow me for me tobe able to send you a private message.

Not applicable

still not working


I am having the same problem for some reason. Unable to send you the private message.