I have a problem with calculations. We have created a document to calculate some working hours. The problem is that the calculated times are calculated wrong when using:
//=sum(if(Hour.STORERKEY = 'ELS'
// and [Function Group] = 'Temp'
// and ActivityType = 'Direct'
// and if(num(left(Tarief.DEPARTMENT,1))>=1,1,0) ,(Approved),0))*24
In the last line and if(num(left(Tarief.DEPARTMENT,1))>=1,1,0) ,(Approved),0))*24 we think the problem is occurring.
In below screenshot you can see in the middle table “Worked Hours Direct temp” The calculated amount is 174 hours. (which is wrong)
In the same screenshot you also see the table “Emiel” this one is calculated right
//=sum( if(Hour.STORERKEY = 'ELS'
// and [Function Group] = 'Temp'
// and ActivityType = 'Direct'
// ,(Approved),0))*24
Here we calculated each department individual and the result is 137 hours (which is the correct one)
This is an sample of the data, the reason they are using if(num(left(Tarief.DEPARTMENT,1))>=1,1,0) ,(Approved),0))*24 isbecause Tarief.DEPARTMENT doesn’t need to start with an number.
3-jul-12 EBN Temp Direct 5. Stage & Load 0,020833333
3-jul-12 EBN Temp Direct 5. Stage & Load 0,041666667
3-jul-12 EBN Temp Direct 5. Stage & Load 0,09375
3-jul-12 EBN Temp Direct 5. Stage & Load 0,25
3-jul-12 EBN Temp Direct 5. Stage & Load 0,291666667
3-jul-12 ELS Temp Direct 1. Unload & Receive 0,020833333
3-jul-12 ELS Temp Direct 1. Unload & Receive 0,041666667
3-jul-12 ELS Temp Direct 1. Unload & Receive 0,072916667
3-jul-12 ELS Temp Direct 1. Unload & Receive 0,114583333
3-jul-12 ELS Temp Direct 1. Unload & Receive 0,270833333
3-jul-12 ELS Temp Direct 2. Putaway & Pick 0,041666667