Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
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' )

Highlighted
MVP & Luminary
MVP & Luminary

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.

Highlighted
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.