I'm trying to create a time-sheet form for field workers to record their activities + clock their hours. I want it to calculate the time spent on activities and aggregate the total time at the end of the form.
I'm really struggling to work out how to calculate the time. When recording the number of activities, I've set it to skip activities if they haven't been completed. If all activities are completed, then the calculation works, however if one of the time questions is left blank, I get error messages.
I've attached the document here to show what I've tried. I also don't know the proper way of calculating hours spent and have made up some division to get there - but it's not quite perfect. If anyone has any suggestions I'd be so grateful!
Problem is your blank questions aren't being treated as 0 (zero) but rather NaN (literally "not a number"), which throws your entire calculation off. Trick is to explicitly convert any blank responses to 0. Try this: