Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I am having some difficulty with the syntax of the if statement in my load. I am attempting to say
IF [Field] = Yes OR No, then True, False
the syntax I have is
if (([Field1])='Yes' or ([Field1])='No', 'Reviewed') as REVIEW
im sure this is a simple one but Im stuck, any suggestions?
What is exactely your issue?
T:
LOAD *,
if (([Field1])='Yes' or ([Field1])='No', 'Reviewed') as REVIEW
INLINE [
Field1
Yes
No
Maybe
];
seems to work for me.
Hi,
Qlik doesnt seem to like the comma between 'No', and 'Reviewed'
I get an error in the script
(([Field1])='Yes' or ([Field1])='No', 'Reviewed') as REVIEW,
Please post your complete Load statement.
Hi,
If(Field1='Yes' or Field1='No', 'Reviewed') as REVIEW
or
If(Match(Field1,'Yes','No'), 'Reviewed') as REVIEW
should also work.
No reason for a comma causing an error.
Maybe it would help if you posted the error message and some sample data?
thanks
regards
Marco
try this
if(Field1='yes','true',if(Field1='no','false'))