Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 Tatynout
		
			Tatynout
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello,
I am new to Qlik Sense and i am hoping that someone can please point me in the right direction. I have an excel file with two columns and i am trying to create a new field with a condition on the two fields.
My file looks like the picture below. I would like to add a new named Class Type based on the following conditions:
If Cabin=Coach then Economy
if Cabin= Not available then Not Recorded
if cabin =First or Spend<1000 then Economy
How can i please integrate this into my Script? Please help
Thanks in advance .
Tatiana
 
					
				
		
 ignacio_pena
		
			ignacio_pena
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
You can use the next expression in the script:
TEST:
LOAD Cabin,
Spend,
if(upper(Cabin) = 'COACH', 'Economy', IF (upper(Cabin) = 'NOT AVAILABLE', 'Not Recorded', if(upper(Cabin) = 'FIRST' or Spend < 1000, 'Economy', 'Not Type'))) as 'Class Type'
FROM
Test.xlsx
(ooxml, embedded labels, table is Hoja1);
Regards,
 joseph057292
		
			joseph057292
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Certification Coaching is a platform where professional discuss their successful experience in CompTIA Security A+ Certification to guide beginners. Discussion Leads to knowledge so this forum is basically providing knowledgable resources and guidance for its viewers.
 
					
				
		
 ignacio_pena
		
			ignacio_pena
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
You can use the next expression in the script:
TEST:
LOAD Cabin,
Spend,
if(upper(Cabin) = 'COACH', 'Economy', IF (upper(Cabin) = 'NOT AVAILABLE', 'Not Recorded', if(upper(Cabin) = 'FIRST' or Spend < 1000, 'Economy', 'Not Type'))) as 'Class Type'
FROM
Test.xlsx
(ooxml, embedded labels, table is Hoja1);
Regards,
 Tatynout
		
			Tatynout
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thank you it works!
