Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

adoteykwame
Contributor

IF function syntax

Hi,

The field 'class' has AAA and EAA, i would want to classify the records into ACCIDENT or ENGINEERING.

The syntax below didnot work. Please help

load *,

IF(LEFT(class,1)='A','ACCIDENT'),

IF(LEFT(class,1)='E','ENGINEERING') as Class_Name,

1 Solution

Accepted Solutions

Re: IF function syntax

Try moving a parenthesis to the end:

IF(LEFT(class,1)='A','ACCIDENT', IF(LEFT(class,1)='E','ENGINEERING')) as Class_Name,


talk is cheap, supply exceeds demand
1 Reply

Re: IF function syntax

Try moving a parenthesis to the end:

IF(LEFT(class,1)='A','ACCIDENT', IF(LEFT(class,1)='E','ENGINEERING')) as Class_Name,


talk is cheap, supply exceeds demand
Community Browser