September 9, 201312 yr I'm trying to simplify a manual calculation I'm having to perform right now. The company I am with pays employees a day rate ("rate") rather than hourly. No matter what the employee is guaranteed 12 hours of pay per day (sometimes the day rate is for 10 hours). The rate needs to be broken down into an 8-hour ("first 8") hourly rate + time and a half ("remaining") for the remaining 4 hours (or 2 hours if the rate is for 10) to equal the overall day rate. The duration of the day ("duration") is a set of radio boxes. How can this calculation be set up?
September 9, 201312 yr Let ( [ theDuration = 12 ; // your field here thePay = 120 ; // your field here overtimeFactor = 1.5 ; theRemaining = theDuration - 8 ; hoursFactored = ( theRemaining * overtimeFactor ) + 8 ; hourlyRateFactored = thePay / hoursFactored ; first8Pay = 8 * hourlyRateFactored ; remainingPay = theRemaining * hourlyRateFactored * overtimeFactor ] ; "First8 = " & Round ( first8Pay ; 2 ) & ", remaining = " & Round ( remainingPay ; 2 ) )
September 9, 201312 yr Author Thanks for your prompt response, eos. Can you clarify which field this calculation would be applied to? I was under the impression several fields would need separate calculations depending on what part of the rate was being calculated.
September 9, 201312 yr The text result was just for demo. You could choose one field (e.g. first8) to use the calculation (and then of course specify the variable first8Pay as the result), and calculate the other with the expression paymentField - first8.
September 10, 201312 yr Author The text result was just for demo. You could choose one field (e.g. first8) to use the calculation (and then of course specify the variable first8Pay as the result), and calculate the other with the expression paymentField - first8. Perfect. Thank you!
Create an account or sign in to comment