Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
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