Forum Discussion

Estyfodense's avatar
Estyfodense
Helper I
6 years ago
Solved

Work with hours

i'd like sum the total of hours, day by day and make a table like this    start time Final hour  total hh 02/01/2020 18:00:00 18:30:00 00:30:00 02/01/2020 17:00:00 18:00:00 0...
  • Fowmy's avatar
    6 years ago

    Estyfodense 

    Try the following formula: Make sure you do the right formatting of duration 13:30:55 (h:nn:ss)

    Total Hours = 
    SUMX(
        hh,
        HH[Final hour ] - HH[start time]
    )
    Net Total Hours = 
    [Total Hours] - IF( WEEKDAY(MAX(HH[Date]),1) = 7 ,TIME(8,0,0), TIME(4,0,0))

     

    Check Day, I 



    ________________________

    Did I answer your question? Mark this post as a solution, this will help others!.

    Click on the Thumbs-Up icon if you like this reply 🙂

    YouTube, LinkedIn

     

  • mahoneypat's avatar
    mahoneypat
    6 years ago

    To get the correct total, use this measure that references the solution @Fowmy

    Total Net SUMX - SUMX(VALUES(HH[Date]), [Net Total Hours])

    If this works for you, mark it as the solution. Praise is also appreciated. Please let me know if you don't.

    Best regards

    Pat