Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 qlikviewalex
		
			qlikviewalex
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello,
in my diagram I use a formula:
=Count(if(Date#(endDate)=Date#(myDate), [Object-ID]))
This formula works.
Now I change my formula with <=:
=Count( if( Date#(endDate) <= Date#(myDate) , [Object-ID]))
This formula doesn't works. Why?
My goal is a formula such as:
=Count( if( Date#(endDate)<=Date#(myDate) and Date#(startDate)>=Date#(myDate) , [Object-ID]))
I hope someone can help me.
Alex
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
I think it might be because Date#() function returns text instead of number, so Qlikview doesnt do < > calculation with it. Instead of Date#(), you may want to try Date().
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Date format. Yes that could be the reason. Could you post a sample qvw that demonstrates the issue?
 qliksus
		
			qliksus
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		As said by tresesce data format could be a issue change it to maybe something like this
=Count( if( Date(Date#(endDate,'MM/DD/YYYY'),'MM/DD/YYYY') <= Date(Date#(myDate,'MM/DD/YYYY'),'MM/DD/YYYY') , [Object-ID]))
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Have you tried just this?
=Count(If(endDate <= myDate, [Object-ID]))
 
					
				
		
 qlikviewalex
		
			qlikviewalex
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		it was too easy
 
					
				
		
 qlikviewalex
		
			qlikviewalex
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks
