Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Syntax trouble with IF statement

I want to change 2 values to the word ABROAD. Can anyone tell me what's wrong with my syntax?

This code works well:

LOAD Clasificación,
if(Clasificación1='ABA','ABROAD',Clasificación1) as Clasificación1,

This code does not work:

LOAD Clasificación,
if(Clasificación1='ABA' or ERA','ABROAD',Clasificación1) as Clasificación1,

1 Reply
disqr_rm
Partner - Specialist III
Partner - Specialist III

Try this:

LOAD Clasificación,
if(Clasificación1='ABA' or Clasificación1='ERA','ABROAD',Clasificación1) as Clasificación1,

You need to mention field name again after "OR" condition. And you are missing an open single quote for ERA.

Hope this helps.