Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Gysbert_Wassenaar

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

View solution in original post

1 Reply
Gysbert_Wassenaar

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