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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

multiple IF conditions

Hi,

How would I put the following into my script please?

IF ( TransA = 'B' AND FreeField NOT IN ('B', 'Q', 'W', 'K') AND Checked = '1', -Quantity,

IF ( TransA = 'H' AND FreeField = 'P' AND Checked = '1', -Quantity, 0.0) As Delivery

Thanks in advance

Chirag

1 Solution

Accepted Solutions
Not applicable
Author

Thank for the help guys. 

I found/used a very similar method making use of the NOT MATCH() function;

F ( TransA = 'B' AND NOT MATCH (FreeField, 'B', 'Q', 'W', 'K') AND Checked = '1', -Quantity,

IF ( TransA = 'H' AND FreeField = 'P' AND Checked = '1', -Quantity, 0.0) As Delivery

thanks again

C

View solution in original post

3 Replies
MayilVahanan

Hi

     Try like this,

     if(TransA = 'B' and Checked = '1' , if(not mixmatch(FreeField, 'B','Q','W','K'), -Quantity),

IF ( TransA = 'H' AND FreeField = 'P' AND Checked = '1', -Quantity, 0.0)) as Delivery

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

something lke this:

IF ( TransA = 'B' AND match(FreeField,'B','Q','W','K')=0 AND Checked = '1', -Quantity,

IF ( TransA = 'H' AND FreeField = 'P' AND Checked = '1', -Quantity, 0.0) As Delivery

Not applicable
Author

Thank for the help guys. 

I found/used a very similar method making use of the NOT MATCH() function;

F ( TransA = 'B' AND NOT MATCH (FreeField, 'B', 'Q', 'W', 'K') AND Checked = '1', -Quantity,

IF ( TransA = 'H' AND FreeField = 'P' AND Checked = '1', -Quantity, 0.0) As Delivery

thanks again

C