Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 curiousfellow
		
			curiousfellow
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I have a date field with format D-M-YYYY hh:mm:ss
I want to count the number of employees who have september as first month of appearance
I tried count({<month(min(datefield))={9}>} employeenumber) .
Instead of {9} i tried {'sep'} and {'9'} too but I don't get the correct results.
Is it not possible to use the min and month function this way ?
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this?
=count(Distinct {<employee={"=month(min(changedate2))='sep' "}>} employee)
 
					
				
		
 pradosh_thakur
		
			pradosh_thakur
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		in the script editor by default SET DateFormat='M/D/YYYY'; will be there but your format is diffrent
change it to SET DateFormat='D/M/YYYY'; OR SET DateFormat='D-M-YYYY';
Hopefullt it will work if your expression is correct as per your filed name .
regards
Pradosh
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try like:
count(Distinct {<datefield={"=Month(Min({1} datefield))='Sep' "}>} employeenumber)
 curiousfellow
		
			curiousfellow
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Qlik interprets my datefield correct. Tried it with date#(datefield, 'D-M-YYYY') too
However I get "Error in set modifier expression" with a red line below the { of {9}
 
					
				
		
 pradosh_thakur
		
			pradosh_thakur
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I would do this and try
count({<'month(min(datefield))'={9}>} employeenumber)
use distinct if needed.
regards
Pradosh
 
					
				
		
 pradosh_thakur
		
			pradosh_thakur
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		did it work?
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Pradosh,
In set analysis, LHS of '='; a modifier has to be a script generated field name rather than expression.
 curiousfellow
		
			curiousfellow
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		No, this did not work either. I get a wrong result. It counts every lowest datevalue.
 
					
				
		
 pradosh_thakur
		
			pradosh_thakur
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		hi tresesco
i understand that but if he is using a function it should be enclose between single quotes and it is even working for me. please correct me if i am wrong but is it a wrong practice or not at all allowed is Qlik?
Regards
Pradosh
 
					
				
		
 pradosh_thakur
		
			pradosh_thakur
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		post a sample and lets try with that.
regards
Pradosh
