Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

Re: multiple IF conditions

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

3 Replies

Re: multiple IF conditions

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

Not applicable

Re: multiple IF conditions

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

Re: multiple IF conditions

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

Community Browser