Calculate total due based on hours

Hi
In a form I need to calculate total due based on time in and time out fields.
If the total worked upto 1 hour remuneration is say 0.200 fils, subsequent 1 hours is 0.100 fils for each hour. A person working 3 hours gets 400 fils, 2 hours gets 300fils and so onโ€ฆ how to calculate it in a simple and elegant way.
Thanks

Solved Solved
0 3 301
1 ACCEPTED SOLUTION

Please elaboarate how your current [Duration] expression is. If you current duration expression is in column [Duration] with โ€œHH:MM:SSโ€ format, then wrapping it with TOTALHOURS() will give the duration in decimal format. So a duration of 04:30:00 will become 4.5, 00:30:00 will become 0.5 with TOTALHOURS([Duration])

For rounding off please use ROUND() function.

So in general expression could be
IF( TOTALHOURS([Duration])<=1, 200, (200+ (TOTALHOURS([Duration])-1)*100))

With rounding ,

IF( ROUND(TOTALHOURS([Duration]))<=1, 200, (200+ ROUND((TOTALHOURS([Duration])-1))*100))

View solution in original post

3 REPLIES 3
Top Labels in this Space