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

Conditions

hi

how can i make two 'if' condition in a text object for exemple:

=if(a>b,'OK','NO')

and

=if(c>d,'OK','NO')

6 Replies
rubenmarin

Hi, if you need both conditions it should be:

=if(a>b and c>d,'OK','NO')

its_anandrjs

You want this two as single if so

if(a>b,'OK','NO',

if(c>d,'OK','NO'))

Regards

Anand

anbu1984
Master III
Master III

='a>b:' if(a>b,'OK','NO') & '- c>d:' & if(c>d,'OK','NO')

its_anandrjs

In load script create another field like

LOAD if( (a>b) ,'OK',

     if( (c>d) ,'OK','NO')) as Details,a,b,c,d;

LOAD * Inline

[

a,b,c,d

1,2,1,2

];

Or in any text object write expression

=if( (a>b) ,'OK',

  if( (c>d) ,'OK','NO'))

Regards

Anand

Not applicable
Author

anbu cheliyan your method is working but the problem is, if the first insruction works, that's mean the first if works, i dont want to second one to execute

anbu1984
Master III
Master III

='a>b:' if(a>b,'OK','NO') & If(a<b,'- c>d:' & if(c>d,'OK','NO'))