Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
hajili
Contributor
Contributor

Multiple actions with a single if condition

Hello everyone!

I want to execute  multiple actions if the IF expression is met.

for example:

if(my_var=1, my_var2=0 and my_var3='one' ,<my else action>)

putting 'and' in the True case of IF doesn't work. But, I need something like this.

So if my_var=1, I want to set my_var2 to zero and my_var to 'one'.

Please help if you have a solution or any suggestion

Labels (1)
1 Reply
DavidM
Partner - Creator II
Partner - Creator II

I think you either need multiple ifs:

if(my_var=1, my_var2=0,

if(my_var=1,my_var3='one'

,<my else action>))

Edit: Sorry above won't work

 

Or maybe create one variable which you will be able to split with subfield for example:

my_varTMP= '0;one' and then my_var2=subfield(my_varTMP,';',1) and so on