Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 jimgibson
		
			jimgibson
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I am loading the following INLINE table
LOAD * INLINE [
 Metric, ShortDSC, LongDSC, SortOrder, MedianCalc
 A-AD, Door to Admit, median of Door to Admit, 1, Median('A-AD')
 A-OF, Door to On-Floor, median of On-floor, 3, Median('A-OF')
 A-RD, Door to Ready for Discharge, median door to discharge, 2, Median('A-RD')
 ]; 
This loads without errors but when I try to load the Expression into the Definition box of a straight table as $(MedianCalc) I do not get any results. Normally to use the expression I have to use Median([A-AD]) however the INLINE does not like the [] so I replaced them with '' and it loads.
Any ideas on what I am doing wrong?
 jimgibson
		
			jimgibson
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		That was it. Amazing what one little change can make.
thanks
 jimgibson
		
			jimgibson
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This worked great but here is an even bigger challenge. I want to do the same thing to another column and it is calculated by using the formula
Count([PatientEncounterID]) - NullCount([A-AD])
I have been studying your code all afternoon and have not been able to figure out how to recreate it for this calculation. Would you like to take a try at it?
Thanks
 
					
				
		
 settu_periasamy
		
			settu_periasamy
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Have you got the right expression? , if not try the below expression..
I just changed NullCount function instead of Median.
=Count(PatientEncounterID)-
 $(=concat( 'if(Metric=' 
                    & chr(39) & Metric & chr(39) & 
            ',NullCount([' 
                    & Metric & 
             '])', ',') 
                   & concat(right(Metric&')',1))) 
 jimgibson
		
			jimgibson
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You got me in the right direction. Since the entire formula is
Count([PatientEncounterID]) - NullCount([A-RD]) I just used Count instead of NullCount and it started the expression in the proper place and gave me the correct answer.
 
					
				
		
 johnw
		
			johnw
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I wish I'd not been so busy that I wasn't able to reply when you posted. I was like, "Wait, what? I invented what? I highly doubt it was me. I should track down earlier uses and see if I can figure out who used it first." I'm glad settu_periasamy figured out who actually did. 
