Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Highlighted
Not applicable

How to change graph expression/dimension with button?

Hi!

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

Slide1.JPG

8 Replies
datanibbler
Esteemed Contributor

Re: How to change graph expression/dimension with button?

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.

HTH

Best regards,

DataNibbler

Re: How to change graph expression/dimension with button?

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.

Best,

Sunny

Not applicable

Re: How to change graph expression/dimension with button?

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    

Re: How to change graph expression/dimension with button?

Sure we can

Not applicable

Re: How to change graph expression/dimension with button?

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

Re: How to change graph expression/dimension with button?

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

Not applicable

Re: How to change graph expression/dimension with button?

still not working

Re: How to change graph expression/dimension with button?

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