Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
neha_sri
Creator III
Creator III

If- else condition in expressions


As I am new to qlikview,I want to ask that I want to put condition in expression not in load script.How can I do that?

3 Replies
tresesco
MVP
MVP

From help:

if(condition , then , else)

The three parameters condition, then and else are all expressions.
The first one, condition, is interpreted logically.
The two other ones, then and else, can be of any type. They should preferably be of the
same type. If condition is true, the function returns
the value of the expression then. If condition is false, the function returns the value of the
expression else.

Example:

if( Amount>= 0, 'OK', 'Alarm' )

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Simple If

=If(Condition1, True Expression, False Expression)

Nested If

=If(Condition1, True Expression1, If(Condition2, True Expression2, False Expression))

Hope this helps you.

Regards,

Jagan.

Not applicable

Use a simple if expression as mentioned by jagan in the expression box, if there is any syntax errors the window itself will highlight whether the expression entered is correct or not. If syntax is correct, it will show "Expression OK". You can see this on the top-left of the window.