Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
hi guys,
I have a little problem with KPI calculation.
I've this situation:
| Date | employees | revenue | 
|---|---|---|
| 01/01/2017 | 5 | 120000 | 
| 01/02/2017 | 5 | 125400 | 
| 01/03/2017 | 5 | 150000 | 
| 01/04/2017 | 5 | 140000 | 
| 01/05/2017 | 5 | 132500 | 
I have to calculate revenue / employees like :
sum(revenue) / employees
that is:
667900 / 5
But on qlikview if I write:
= sum(revenue) / employees
I get back " - " symbol
so I try:
= sum(revenue) / sum(employees)
this works but the result is incorrect because the values are:
667900 / 25
How can I do?
This is an example and the original table have more values than this.
Thanks
May be this?
sum(revenue) / Count(employees)
 
					
				
		
I tried, but this solution doesn't work
 trdandamudi
		
			trdandamudi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try as below:
Sum(revenue) / Count(Total employees)

Why not?
 Clever_Anjos
		
			Clever_Anjos
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		sum(revenue) / sum(employees)
 
					
				
		
Doesn't work 
 
					
				
		
This example works because there are 5 months, but if you add june, the result of count(employees) will be 6, but the real number of employees is 5
What you mean real ?? May be this? If none of them not works, I would suggest provide real data
sum(revenue) / Count({<employees = {5}>}employees)
 
					
				
		
In this case the result of sum(employees) is 25, but the real number of employees is 5, so this solution doesn't work.
I need to divide the sum(revenue) for the number of employees
