Forum Discussion

sirros_iot's avatar
sirros_iot
Helper III
8 years ago
Solved

Convert time to seconds

Hello all!

I have a column in the hour format( HH:mm: ss), and I want to show the average of this column, but, I'm connected by DirectQuery, so, no data modeling.

I would like to solve this issue using  just one measure, but I'm having problems with this time format, I can't even convert it into seconds.

Any idea?
Thanks

  • sirros_iot

     

    Give this a shot

     

    Seconds_Measure =
    VAR myvalue =
        SELECTEDVALUE ( Table1[Column] )
    RETURN
        ( myvalue - TRUNC ( myvalue ) )
            * 86400

3 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Community Champion

    sirros_iot

     

    Give this a shot

     

    Seconds_Measure =
    VAR myvalue =
        SELECTEDVALUE ( Table1[Column] )
    RETURN
        ( myvalue - TRUNC ( myvalue ) )
            * 86400
    • Doknights's avatar
      Doknights
      Frequent Visitor

      Hello, Can you explain this formula a bit more to me?

       

      The "myvalue" is that part of the formula or some custom information that has to be entered?