Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 jasonrimkus
		
			jasonrimkus
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Migrating an App to Qliksense, the following script worked as intended in Qlikview, but is throwing syntax errors in QS.
the variable governs whether or not i want to load in where CustomerNLCStatusAsOfCall = 'N/L' or not. This greatly reduces the data, but sometimes i want to load them in for other analysis. \
if $(vLoadClients) = 0, Load this Script, Load other script
------------------------------------------------------------------------
if $(vLoadClients) = 0
Activities: NoConcatenate
Load * Resident ActivitiesTEMP
where year(ActivityDate) >= '$(vResultsThruYear)' 
and (CustomerNLCStatusAsOfCall = 'N/L' or CustomerNLCStatusAsOfCall = 'UnMatched')
;
Else
Activities: NoConcatenate
Load * Resident ActivitiesTEMP
where year(ActivityDate) >= '$(vResultsThruYear)'
;
Endif;
 GaryGiles
		
			GaryGiles
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		In Qlik Sense, you need a "then" with If and space between endif. Try this:
if $(vLoadClients) = 0 then 
Activities: NoConcatenate
Load * Resident ActivitiesTEMP
where year(ActivityDate) >= '$(vResultsThruYear)' 
and (CustomerNLCStatusAsOfCall = 'N/L' or CustomerNLCStatusAsOfCall = 'UnMatched')
;
Else
Activities: NoConcatenate
Load * Resident ActivitiesTEMP
where year(ActivityDate) >= '$(vResultsThruYear)'
;
End if
 GaryGiles
		
			GaryGiles
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		In Qlik Sense, you need a "then" with If and space between endif. Try this:
if $(vLoadClients) = 0 then 
Activities: NoConcatenate
Load * Resident ActivitiesTEMP
where year(ActivityDate) >= '$(vResultsThruYear)' 
and (CustomerNLCStatusAsOfCall = 'N/L' or CustomerNLCStatusAsOfCall = 'UnMatched')
;
Else
Activities: NoConcatenate
Load * Resident ActivitiesTEMP
where year(ActivityDate) >= '$(vResultsThruYear)'
;
End if
 jasonrimkus
		
			jasonrimkus
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		