Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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
Partner - Champion III
Partner - Champion III

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
Partner - Champion III
Partner - Champion III

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