Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 jleefjcapital
		
			jleefjcapital
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I am using a panel dataset which contain two separate categories. I would like to separate out by one of the categories. For instance, I have one category which is region, and the other as employment type. I would like to write an if statement to only load the regions for a single employment type. I tried using the following, but it keeps causing an error- "Field not found" I think this statement implies that "management_occupations" is a field, but it's a value. How should I change this so that it only pulls the regions where OCC_TITLE = "Management_Occupations"?
Thank you.
LOAD
AREA_NAME as MSA,
"LOC QUOTIENT" as LQ_MSA,
H_MEDIAN,
If("OCC_TITLE" = [Management Occupations], "OCC_TITLE", NULL) as Management_Occupation
FROM [lib://Employment/MSA_M2014_dl.xlsx]
(ooxml, embedded labels, table is MSA_dl);
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try
LOAD
AREA_NAME as MSA,
"LOC QUOTIENT" as LQ_MSA,
H_MEDIAN,
If("OCC_TITLE" = 'Management Occupations', "OCC_TITLE", NULL() ) as "Management_Occupation"
FROM [lib://Employment/MSA_M2014_dl.xlsx]
(ooxml, embedded labels, table is MSA_dl);
 
					
				
		
 ecolomer
		
			ecolomer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try writting Null() in your expresion.
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try
LOAD
AREA_NAME as MSA,
"LOC QUOTIENT" as LQ_MSA,
H_MEDIAN,
If("OCC_TITLE" = 'Management Occupations', "OCC_TITLE", NULL() ) as "Management_Occupation"
FROM [lib://Employment/MSA_M2014_dl.xlsx]
(ooxml, embedded labels, table is MSA_dl);
 
					
				
		
 ecolomer
		
			ecolomer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This is the same I said
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I added also single quotes around the literal 'Management Occupations'
 
					
				
		
 ecolomer
		
			ecolomer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Ok, I'm sorry
 
					
				
		
 MarcoWedel
		
			MarcoWedel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		If(OCC_TITLE = 'Management Occupations', OCC_TITLE) as Management_Occupation
should also work.
regards
Marco
 jleefjcapital
		
			jleefjcapital
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thank you!
 jleefjcapital
		
			jleefjcapital
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thank you!
 jleefjcapital
		
			jleefjcapital
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thank you!
