Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 akuttler
		
			akuttler
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I am new to Qlik and I am having trouble with an expression:
1) Sum({$<Year={2017}>}$(VCountNewPatients))
Where vCountNewPatients = Count({<CPT={'99201','99202','99203','99204','99205'}>}Distinct PATIENTID)
I am trying to sum the # of New Patients in 2017. But 1) expression comes back as null.
CPT =99201','99202','99203','99204','99205 refers to New Patient office visits .
I cant figure how to use a set a modifier with the CountNewPatients Variable.
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Why not add the year to you expression?
Count({<CPT={'99201','99202','99203','99204','99205'}, Year = {2017}>}Distinct PATIENTID)
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Why not add the year to you expression?
Count({<CPT={'99201','99202','99203','99204','99205'}, Year = {2017}>}Distinct PATIENTID)
 akuttler
		
			akuttler
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Even better, it worked. Thanks so Much.
 akuttler
		
			akuttler
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		HI,
How do I write the expression but for a specific date range instead of year...like Jan-Oct 2017?
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Do you have a date or monthyear field? What is it called?
 akuttler
		
			akuttler
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Yeah its called "Month Year".
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Can you share the script used to create it in the back end of the app?
 akuttler
		
			akuttler
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Date(MonthStart("Transaction Date"),'MMMM YYYY') as "Month Year",
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be this
Count({<CPT={'99201','99202','99203','99204','99205'}, [Month Year]= {"$(='>=' & Date(YearStart(Max([Month Year])), 'MMMM YYYY') & '<=' & Date(Max([Month Year]), 'MMMM YYYY'))"}>} Distinct PATIENTID)
