Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Multiple if scenarios assign to same variable name

 

if ([Template Name]='ZZ24','ZZ24 Trial', If([Loss Mit Template Name]='ACO','ACO Trial')) as [trial type]

The above code populates the name trial type with either ZZ24 Trial or ACO Trial

How would I handle the same scenario if multiple templates share the same result?  Example

if ([Template Name] 'XXX13','CC23','GH22' then assign the name 'Central') as [trial type]

In other words these 3 will be assigned the name Central and we end as trial type

1 Reply
Partner
Partner

Re: Multiple if scenarios assign to same variable name

another if but with or between conditions :

if([Template Name]='XXX13' or [Template Name]='CC23' .... etc