Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

If And Statement in Script

Hello,

I would like to create the equivalent of an If(And()) statement, as seen in Excel, in the QV script.

I would like an output of '1' if column A = column B = column C, and an output of '0' if this is not true. I imagine the syntax would be something like the following, but haven't got it quite right:

     if( = ,if ( = ,1,0)) as

Any thoughts?

Thank you!

Tags (1)
4 Replies

Re: If And Statement in Script

Re: If And Statement in Script

Hi,

Try to load like this

LOAD

iF( (A=B),1,

if( (B=C),1,0)) as D, A,B,C;

LOAD * Inline

[

A,B,C

1,1,1

];

And change value according to result

Regards

Anand

Re: If And Statement in Script

Oh i am sorry actually write And

if( (A=B) And (B=C),1,0) as D

Regards

Anand

Re: If And Statement in Script

-(A=B And B=C) as D