Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 knightwriter
		
			knightwriter
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi all,
I want to make an additional query in my script to only include certain this year and last year only. What am I doing wrong?
LOAD *,
if(isnull([Opportunity]),'NO ',[Opportunity]) AS [Opportunity inc Nulls]
FROM [\\$(oEnvironment)\Qlikview\QVDs\Opportunity.qvd] (qvd)
Where ([Opportunity Anticipated Year] >= (Year(Today()) - 1));
 
					
				
		
 pooja_sn
		
			pooja_sn
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Above query looks good.Is there any error message you are getting ?
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Looks right, the only thing I would check is if [Opportunity Anticipated Year] is text or number? What is the exact error that you see when you load the above script?
 knightwriter
		
			knightwriter
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks, I created a master calendar with that field name and I believe it couldnt pick it up. I changed it to Add Year and seemed to work ok.
 
					
				
		
 Colin-Albert
		
			Colin-Albert
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Check the data in Opportunity Anticipated Year, is it YYYY or YY and is it the same format as "Year(Today()) -1"
