Discussion Board for collaboration on QlikView Scripting.
Can anybody please show an example of Switch Case statement and how it works with an intermediate-advanced example for some data?
I would like to understand it better
Re: switch control statement
Specific Example of Switch Case statement
The switch is a script control structure that functions like a series elseif statements:
if ... then ...
case 1 // execute if statement evaluates to 1
case 2 // execute if statement evaluates to 2
default // execute if no case statement match (like a final "else")
Unlike mainstream programming languages, there is no "break" statement. Each "case" is an implicit break for the case above.
PS - I don't think i have ever used it in a real application, but YMMV
Thank you for the replies but I am still not finding a practical example. Could someone share a practical one please?
Why would you use Switch Case statements? What are the advantages and disadvantages of this function?