Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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!

4 Replies
Anonymous
Not applicable
Author

its_anandrjs

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

its_anandrjs

Oh i am sorry actually write And

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

Regards

Anand

MarcoWedel

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