Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 simonwithey
		
			simonwithey
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I have the following variable:
LET vMonthStart = monthstart(Today());
Then in my data load I have:
WHERE "My_Date" < $(vMonthStart);
It returns no records but if I use WHERE "My_Date" <> $(vMonthStart); it does.
I need the less than function to work rather than not equal to.
What am I doing wrong??
Many thanks
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be add single quotes around your variable
WHERE "My_Date" < '$(vMonthStart)';
 simonwithey
		
			simonwithey
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Cheers Sunny, that seems to work. Thanks for the prompt response.
 its_anandrjs
		
			its_anandrjs
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be you can use it direct also
Ex:-
WHERE "My_Date" < vMonthStart
Or
WHERE "My_Date" < '$(vMonthStart)'
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		That's awesome, please close the thread if you got what you wanted.
Qlik Community Tip: Marking Replies as Correct or Helpful
Best,
Sunny
