Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

CASE statement in qlikview

Hi,

Is there any use of case statement in qlikview?

4 Replies
Gysbert_Wassenaar

yes, search for switch case in the help file (or on the forums)


talk is cheap, supply exceeds demand
Not applicable
Author

thanks

johnw
Champion III
Champion III

Or if you mean for an expression:

pick(match(MyField,'Case 1','Case 2'),Result1,Result2)

Or with a default:

pick(1+match(MyField,'Case 1','Case 2'),Default,Result1,Result2)

A series of if() statements may be easier to read in an expression, though.

Not applicable
Author

Hi so using your syntax how would you convert this syntax below. I know how to use the if statements but want to compare with case as well

  CASE WHEN "GENPOLICY"."POL_CANCEL_CDE" IS NULL THEN "MDRCANCELREF"."MDRCANCELREF_KEY"

                  ELSE "GENPOLICY"."POL_CANCEL_CDE"

             END As "Cancel Code"