Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
diane_yu
Contributor II
Contributor II

Load statement using Case and When

Please Help!

I know  Qlik does not support CASE WHEN statement and I have tried various "IF" statements but no luck so far.

I'm working on Load statement to create a new column and I am using  "IF ... AND" statement.

I have 2 data elements A_Status (Kept, Pending, S-Call, Tel-Con, and Walk-in) and B_Status (Complete, Unresolvable and Warning).  In order to close the record, A_Status should be one of 5 list "AND" one of the list from B_Status.

Case when

    A_status in ('Kept', 'Pending', 'S-Call', 'Tel-Con', 'Walk-in') and B_status in ('Complete', 'Unresolvable', 'Warning') then 1

End

Thank you for your support in advance!

1 Solution

Accepted Solutions
sunny_talwar

Have you tried this?

If(Match(A_status, 'Kept', 'Pending', 'S-Call', 'Tel-Con', 'Walk-in') and Match(B-status, 'Complete', 'Unresolvable', 'Warning'), 1) as ColumnName

HTH

Best,

S

View solution in original post

3 Replies
sunny_talwar

Have you tried this?

If(Match(A_status, 'Kept', 'Pending', 'S-Call', 'Tel-Con', 'Walk-in') and Match(B-status, 'Complete', 'Unresolvable', 'Warning'), 1) as ColumnName

HTH

Best,

S

diane_yu
Contributor II
Contributor II
Author

Thank you!   That did it.  I tried pick(wildmatch) option but it didn't worked.  What is the difference between match, pick, and wildmatch? I'm sorry but I'm new to Qlick.  Can you use pipe(|) instead of comma when you listing items?

Thanks.

sunny_talwar

I have never tried it with the pipe (and I doubt it would work), but you can give it a try.

From QlikView Help (F1) these are definition with examples for Pick, Match, WildMatch, MixMatch

HTH

Best,

S