Summing up hours of different people for work orders

Hi All,

How can i add hours of different people of the same work-order…
Sum(Hour((select(Working hours[Total],[Order] = [_THISROW].[Timestamp]))))

Total = duration
Order is the number of the workorder
the select is making a list of all total registrated hours on this order

but then i have a problem, i can not sum them up directly as it is not a number…
converting it to a number by using hours is not possible because it is a list…

any ideas…
thanks

0 4 810
4 REPLIES 4

Use a VC to convert Total to Hours as number and Sum that.

Hi! The category for this post is wrong. Even though it’s an old post, I think the fact that it’s in the “Tips & Tricks” category makes it come up higher in searches. At the very least, it make people more like to read it, assuming that someone has written a detailed article about how to work with hours. So, I think it would be good if someone could correct the category.

Fixed.

@Kirk_Masden Or we can just put a good answer here for people to find.


Easily sum the hours for a list of records

If you have a table that is used to record multiple time entries (work orders, time logs, etc.), with each record in the table having a duration column containing however long it took to complete whatever, you can easily find the total number of hours from the duration by making use of the TOTALHOURS() formula.

2X_8_8592cd7019046e6066ef40c2d04a5d269b384bad.png

If you make use of this, you won’t have to create a virtual column in your data entry table to hold the total number of hours (this could eventually cause your app to slow down if you have a lot of records in the table) - nor will you have to create a physical column in the table to hold the total number of hours - instead you can accomplish everything right in the same column on whatever table you were wanting to hold the summed total.

TOTALHOURS(SUM(SELECT(Working hours[Total], [Order] = [_THISROW].[Timestamp])))

  • The SELECT() creates a list of all the durations
  • The SUM() adds them all together
  • TOTALHOURS() extracts out the number of hours in decimal form.
Top Labels in this Space