Formula for Total Time
What is the proper syntax for adding two time values together?
I have table that contains fields for Status, Timestamp and Duration.
Status is a text field, Timestamp is a Date/Time field and Duration is a formula field that calculates the difference between consecutive Timestamps.
I want to be able to add Durations together based on their Status to determine the total time spent at each Status.
Any suggestions?
5 replies
-
Maybe something like this:
Formula field that sums up the duration when the status is "Completed",
sum((select YourTableNameHere)[Status = "Completed"].Duration)
-
or
let myStatus := Status;
sum((select YourTableNameHere)[Status = myStatus].Duration)to view a duration summary for a Status that matches the current record.
-
It's returning a zero value.
I think the issue is that it can't logically sum Duration since it's reading Duration as a string; however, it also doesn't work when I try to convert it to a number using number(Duration), probably because the string is formated to represent time (dd:hh:mm). That's why I innitally asked about how to add time values.
-
This might help illustrate what I'm trying to achieve:
Each button push creates a record in 'Design Progress' with a Timestamp of "now". The Duration colomn captures the diffence between each Timestamp. To the right of the chart showing the 'Percent Complete' I want to have a series of formula fields that indicate the total amount of time spent at each Status. I just need the proper syntax for adding multple time durations together.
-
In one of my databases that i'm using duration summary, i have the gollowing setup
I hope it helps...
Content aside
- 5 yrs agoLast active
- 5Replies
- 1932Views