Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 greend21
		
			greend21
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I'm trying to find out the average calls per day but only for work days. In my data, the sum(#of Calls) is 0 on non working days so maybe I could calculate the data by excluding those days where the sum(#ofCalls)=0, so maybe a count of that. I was thinking this would be some sourt of sum(#ofcalls)/Count(pick(match())) but I am not completely sure. I now think this might need set analysis.
Any help is greatly appreciated!
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be this
Sum([#OfCalls])/Count({<[#OfCalls] -= {'0'}>} DISTINCT Days)
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Is this not working?
Avg([#OfCalls])
or
Avg({<[#OfCalls] -= {'0'}>} [#OfCalls])
 
					
				
		
 m_woolf
		
			m_woolf
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Create a WorkDays flag in script. Then:
=avg({<WorkDays={1}>}[#ofCalls])
 greend21
		
			greend21
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		These do not work. It may be because I have daily data broken down by employees, although in this case I'm looking for the monthly average. Each day has multiple records. The actual average for Sept should be 194 but the following are the results:
Avg([#OfCalls]) = 40.6
Avg({<[#OfCalls] -= {'0'}>} [#OfCalls]) = 42.58
 greend21
		
			greend21
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Do you mean have an if statement in the script that = Workdays? Could you explain this more?
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be this
Sum([#OfCalls])/Count({<[#OfCalls] -= {'0'}>} DISTINCT Days)
 greend21
		
			greend21
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This returned a null value. Where you have days it would actually be my date field, correct?
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Yes
 
					
				
		
 m_woolf
		
			m_woolf
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Is there some CallDate field? If so, in script something like:
if(weekday(CallDate)<5,1,0) as Workday,
 greend21
		
			greend21
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I tried it again and it worked this time. Thanks!
