Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
imark
New Contributor II

Control flow: IF vs SWITCH

The need to solve a certain issue sparked a small philosophical debate on the existential purpose of two different control-flow constructs within QV.

To my eye, they serve the same exact purpose, so I am wondering "why having them both". Are there situations where either one is to be preferred to the other?

1 Reply
MVP & Luminary
MVP & Luminary

Re: Control flow: IF vs SWITCH

It's not Qlik specific else quite common constructs in scripts/programs. Therefore take a look here:

difference-between-if-else-and-switch
what-is-the-difference-between-if-else-and-switch

- Marcus