7 Replies Latest reply: Nov 23, 2017 8:17 AM by Ralf Heukäufer

# Need two conditions to be true under one if condition in Qliksense

Hi,

I have selected two Quarters from Quarter filter.

And I want that if these two Quarters are selected, then if the Quarter = Q1 then condition 1 and for any other Quarter ,condition 2.

And both these condition should run simultaneously.

Kindly help.

• ###### Re: Need two conditions to be true under one if condition in Qliksense

Hello,

you can work with a GetFieldSelections here

For example:

if(GetFieldSelections(Quarter)='Q1', condition1,condition2)

I don´t know exactly what you mean with run simultaneously?

• ###### Re: Need two conditions to be true under one if condition in Qliksense

if(GetSelectedCount(Quarter)>1,if(Quarter='Q1',

condition1 and

if(Quarter='Q2' or Quarter='Q3' or Quarter='Q4',

condition2).

It looks like while function that wherever there is Q1 it follows condition1 and for any other ,condition2.

it means if I select Q1 and Q2 both then it should appear as condition1 & condition2 together.

• ###### Re: Need two conditions to be true under one if condition in Qliksense

In that case you must create something like that:

if(GetFieldSelections(Quarter) like 'Q1, Q2*', condition1condition2, if(GetFieldSelections(Quarter) like 'Q2*', condition2,if(GetFieldSelections(Quarter)='Q1', condition1)))

• ###### Re: Need two conditions to be true under one if condition in Qliksense

if(GetFieldSelections(Quarter) like 'Q1, Q2*', condition1condition2, if(GetFieldSelections(Quarter) like 'Q2*', condition2,if(GetFieldSelections(Quarter)='Q1', condition1)))

I have to write condition1condition2 simultaneously ??

• ###### Re: Need two conditions to be true under one if condition in Qliksense

If I understand you right

(it means if I select Q1 and Q2 both then it should appear as condition1 & condition2 together.)

then yes in that case you must write the code of both executions in the if clause.

If both were chosen, both should be executed

• ###### Re: Need two conditions to be true under one if condition in Qliksense

But it is not working.

• ###### Re: Need two conditions to be true under one if condition in Qliksense

Can you upload an example App?