Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
kaushi2020
Creator II
Creator II

Case based conditions from SQL to Qlik sense

Below is a case statement written in SQL, looking forward for support to convert this to qlik sense expressions.

case
when cat_name like '%Auto%' then 'Auto'
when cat_name like 'Mot%' then 'Motor'
when cat_name like 'Tes%' then 'Testing'
when cat_name like 'Pen%' then 'Pending'
when cat_name like 'hold%' then 'On-Hold'
else 'Others'
end Category

thanks in advance.

Labels (4)
1 Reply
BrunPierre
Partner - Master
Partner - Master

Hi, Like this.

Coalesce(If(WildMatch(cat_name,'*Auto*'),'Auto',
If(WildMatch(cat_name,'Mot*'),'Motor',
If(WildMatch(cat_name,'Tes*'),'Testing',
If(WildMatch(cat_name,'Pen*'),'Pending',
If(WildMatch(cat_name,'Hold*'),'On-Hold'))))),'Others') as Category