Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 leocattqv
		
			leocattqv
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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?
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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.
 
					
				
		
 leocattqv
		
			leocattqv
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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,
 
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Please post your complete Load statement.
 
					
				
		
 MarcoWedel
		
			MarcoWedel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
 
					
				
		
 raman_rastogi
		
			raman_rastogi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		try this
if(Field1='yes','true',if(Field1='no','false'))
