Help

Need help calculating multiple fields

Topic Labels: Formulas
882 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Mark_Comish
6 - Interface Innovator
6 - Interface Innovator

We track time and often time there are more than one entry until we get a total. Here is what we do…

{Start Time 1} and {End Time 1} and calculation formula is DATETIME_DIFF({End Time 1},{Start Time 1},‘seconds’)
{Start Time 2} and {End Time 2} and calculation formula is DATETIME_DIFF({End Time 2},{Start Time 2},‘seconds’)
{Start Time 3} and {End Time 3} and calculation formula is DATETIME_DIFF({End Time 3},{Start Time 3},‘seconds’)

Then I have a Total Calculation formula Field: {Calculation 1} + {Calculation 2} + {Calculation 3}

The problem is if one of the calculation fields is empty the Total Calculation field just show “NaN”.

I would love any advice on how to solve this or a better way to calculate overall.

1 Reply 1
Mark_Comish
6 - Interface Innovator
6 - Interface Innovator

I think I got it…

DATETIME_DIFF({End Time 1},{Start Time 1},‘seconds’)
IF(NOT({End Time 2} = “”), DATETIME_DIFF({End Time 2},{Start Time 2},‘seconds’), BLANK())
IF(NOT({End Time 3} = “”), DATETIME_DIFF({End Time 3},{Start Time 3},‘seconds’), BLANK())