Forum Discussion

SChariton's avatar
SChariton
New Member
2 years ago
Solved

Convert Seconds to Hours

I'm working with time duration that comes in seconds. I've already converted the metric to hh:nn:ss, but that won't work for our purposes as we need a sum or average to show for whatever time frame t...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi SChariton ,

     

    As lbendlin  said, you can divide the seconds value by 3600 to get the hour value. Detailed steps are shown below.


    1. Based on your description, I created this data.

    2. Create a calculated column or measure and write an expression. In this example I created a calculated column. For more information about the divide function, please refer to the documentation: DIVIDE function (DAX) - DAX | Microsoft Learn.

    hour = DIVIDE('Table'[sec],3600)

    3. The results can be formatted in the table tool, in this example I kept the results to 3 decimal places.

    4. The final result is shown in the figure below.

     

    If your Current Period does not refer to this, please clarify in a follow-up reply.

     

    Best Regards,

    Clara Gong

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.