Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

conditions

hi,

how can i execute this condition in qlikview:

if(A>B){

       print('toto')

}else{

     print('titi'),

}else if(D>J){

    print(toto1)

}else{

     print(toto2)

}

1 Solution

Accepted Solutions
Not applicable
Author

Try doing the test with the inverted logic:


if(A<=B,'titi',if(D>J,'toto1','toto2'))

View solution in original post

6 Replies
puttemans
Specialist
Specialist

Hi,

I think this is the logic you're trying to script.

IF( (A>B), (IF(D>J) toto1, toto2), titi);

If A>B then you look whether D>J to define the type of toto to print, if the first condition does not apply, you print titi.

Regards,

CELAMBARASAN
Partner - Champion
Partner - Champion

You have been asking on the Nested If,

Simple if:

If(condition, Expression for true, Expression for else)

If(condition, Expression for true, if(condition, Expression for true(else if part), Expression for false))

sujeetsingh
Master III
Master III

if(A>B 'toto',

if(D>J 'toto1','oto2'),'titi')

simenkg
Specialist
Specialist

in the script and you want to write to the "console"?

IF A > B THEN
     Trace 'toto';

ELSEIF B<A THEN

     Trace 'titi';

ELSEIF D>J THEN
     Trace 'toto1';

ELSE

     Trace 'toto2';

ENDIF

Not applicable
Author

Try doing the test with the inverted logic:


if(A<=B,'titi',if(D>J,'toto1','toto2'))

Not applicable
Author

thank you guys it works