
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If Else If Else ?
Hi All,
I am in need to use If Else If Elseconditon in my application..
please share the application ..
Regards,
Helen

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Look at the below posts.
http://community.qlik.com/thread/117309
http://community.qlik.com/message/315707#315707
Regards
ASHFAQ

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please can you be more specific of what you need.
May be give details like - you need a if else condition
in load script or in chart expressions.
Regards
Nitha

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
There are so many ways of using the if else if condition some are in the load script and some are expressions but in expression if condition has not good performance. But in load you can use it many ways check the below discription from the help and small examples.
If..then..elseif..else..end if
The if..then control statement is a script selection construct forcing the script execution to follow different paths depending on one or several logical conditions. The syntax is:
if condition then
[ statements ]
{ elseif condition then
[ statements ] }
[ else
[ statements ] ]
end if
Where:
condition is a logical expression which can be evaluated as true or false.
statements is any group of one or more QlikView script statements.
Since the if..then statement is a control statement and as such is ended with either a semicolon or end-of-line, each of its four possible clauses (if..then, elseif..then, else and end if) must not cross a line boundary.
Examples:
Let a = 1;
if a=1 then
load * from abc.csv;
sql select e, f, g from tab1;
end if
if a=1 then; drop table xyz; end if;
if x>0 then
load * from pos.csv;
elseif x<0 then
load * from neg.csv;
else
load * from zero.txt;
end if
Hope this helps

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As script statement
IF <condition> THEN
statement1
ELSE
IF <condition2> THEN
statement2
ELSE
statement3
ENDIF
ENDIF
as an expression
IF(<condition>,expression1,if(<condition2>,expression2,expression3))
