Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
imark
Contributor III
Contributor III

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?

Labels (1)
1 Reply
marcus_sommer

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