Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
wanyunyang
Creator III
Creator III

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
sunny_talwar

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

View solution in original post

4 Replies
sunny_talwar

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

zebhashmi
Specialist
Specialist

I am not sure about when maybe while and where

so looks like IF is only choose

Anonymous
Not applicable

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 ?

sunny_talwar

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