Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Highlighted
Not applicable

Show condition with 2 variables

Hi everyone,

is it possible to set up the show conditional of a list box on 2 variables?

I want to set 2 variables with 2 different buttons and if there is the right combination the list box should appeare.

With just 1 variable it works easy, but how can I handle 2?

Thanks for helping

1 Solution

Accepted Solutions
Partner
Partner

Re: Show condition with 2 variables

like the attached app?

View solution in original post

20 Replies
qlikmsg4u
Valued Contributor

Re: Show condition with 2 variables

try show condition with if statement.

Something like  =If($(vVar1)=1 and $(vVar2)=2,1,0)

MVP
MVP

Re: Show condition with 2 variables

just a small example, listbox visible when condition on variables  v1, v2 is

v1 and v2

1.png

Not applicable

Re: Show condition with 2 variables

I've tested it and the more I think about it, the less sense makes it for me to use an if statement.

The normal usage of 'Show'  'Conditional' is something like: put vVar1=1 in the field. In this case the Box is shown if the variable vVar1=1 it is not necessary to create an own if statement. But the Problem is, a connection with 'and' is also not working.

Do u have any other ideas?

Partner
Partner

Re: Show condition with 2 variables

it should work with 2 conditions which are connected with "and"

but other possibility would be to use a new variable which handles the state of your 2 bttuons

and the state you Need.

then us this new variable in your condition (newvar=1)

Not applicable

Re: Show condition with 2 variables

Unfortunately, the example that you show does not work, because you've only used the variables, but it does not depend of the value of the variable. Just the existance of the variable is not sufficient. In addition, the connection with and, unfortunately, does not work.

Any other ideas?

Not applicable

Re: Show condition with 2 variables

it do not work with 2 conditions which are connected with 'and'

can u give me more details or a explicit example how u would handle 1 variable with 2 buttons?

Re: Show condition with 2 variables

Try,

vShow1 or vShow2

or

vShow1 and vShow2

Not applicable

Re: Show condition with 2 variables

Not sure what you mean by 'Just the existance of the variable is not sufficient'. And as you mentioned, If condition is not required. If both the variables' values are numeric and something other than zero (0), then the condition becomes TRUE and the object will be visible.

Can you give more details like, what you are doing when the buttons are clicked etc. Upload a sample QVW for quick resolution.

Regards,

KKR

Not applicable

Re: Show condition with 2 variables

The first button set vVariable1=0 the second button set vVariable2=1.

The Listbox should be shown if there is the combination of vVariable1=0 and vVariable2=1