Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

wanyunyang
Contributor

IF vs CASE...WHEN

Hi guys,

Can we use CASE...WHEN in QLIK SENSE expression? If so, which is more efficient? IF or CASE...WHEN?

Thanks for help!

1 Solution

Accepted Solutions
MVP
MVP

Re: IF vs CASE...WHEN

There is no CASE statement in Qlik world... but you can use Pick(Match(...)) which gives better performance then if statements

4 Replies
MVP
MVP

Re: IF vs CASE...WHEN

There is no CASE statement in Qlik world... but you can use Pick(Match(...)) which gives better performance then if statements

zebhashmi
Valued Contributor

Re: IF vs CASE...WHEN

I am not sure about when maybe while and where

so looks like IF is only choose

Re: IF vs CASE...WHEN

Pick(Match(...)) certainly gives better looking code which I find easier to understand and less brackets to count up and get correct, but I am not sure if it gives better performance.  Do you know of any metrics that have been done re this ?

MVP
MVP

Re: IF vs CASE...WHEN

It might be a myth, but have seen some places where Pick Match helped people improve the expression.... Also, HIC's description of if makes me think that it might do worse then Pick... but have not seen any threads where a comparison has been done.

Some places which might be worth going through.

HIC's response here

Re: help - performance improvements

Marcus's response here

Pick Match vs Nested If Performance