Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

CASE statement in qlikview

Hi,

Is there any use of case statement in qlikview?

4 Replies

Re: CASE statement in qlikview

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


talk is cheap, supply exceeds demand
Not applicable

Re: CASE statement in qlikview

thanks

MVP
MVP

Re: CASE statement in qlikview

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

Re: CASE statement in qlikview

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"

Community Browser