How to weigh/multiply records on row level and then get correct average?
We have a problem how to weigh on row level.
We want to weigh one field based on another field. NumberOfPersonsUsed should be weigh on how much planned production time (PlanProdTime in seconds) the row has. The reason is that number of persons could differ between different times and we should show how much persons have been used for each planned hour in average for the order.
We have tried the following:
=(SUM(NumberOfPersonsUsed*PlanProdTime)/(Sum(PlanProdTime))) and =(SUM({$<PlanProdTime={">0"}>}NumberOfPersonsUsed*PlanProdTime)/(Sum(PlanProdTime)))
I.e. to multiply each row first and then divide on sum of PlanProdTime.
But they give a value over 1 for the below example, around 1.1. I.e. it is not weigh correctly. It seems to sum all NumberOfPersonsUsed before it multiplies with planProdTime.