Discussion board where members can get started with QlikView.
I am not clear about switch control statement.
Please give an example to Switch.
Thanks in advance.
This is from the QlikView help.
If I evaluates to 1, the first load statement is executed, if I evaluates to 2 the second load statement is executed and in any other case the third load statement is executed.
load '$(I): CASE 1' as case autogenerate 1;
load '$(I): CASE 2' as case autogenerate 1;
load '$(I): DEFAULT' as case autogenerate 1;
Switch control statement(conditional statement) used to control logical flow of script execution. Executes one of many choices,based on the value of an expression. If no match is found for the value, the DEFAULT statements are executed.
[Executed when ‘I’ is 1]
[Executed when ‘I’ is 2]
[Executed when ‘I’ is 3]
[Executed when ‘I’ is not 1 or 2 or 3]