Forum Discussion

orischmann9291's avatar
orischmann9291
Frequent Visitor
8 years ago
Solved

Set as MM:SS

I need to have time done as only MM:SS without hours so that the time would read as 90:30 rather than 1:30:30.  Is there a way to create a custom format for a colukmn similar to how it is done in excel allowing me to have my data read this way?

  • Anonymous's avatar
    Anonymous
    8 years ago

    Hi orischmann9291,

     

    You can create a DAX Column Minutes so you can perform calculations with it:

     

     

    Minutes = HOUR(Table[Time_Column])*60 + 
    MINUTE(Table[Time_Column]) +
    DIVIDE(SECOND(Table[Time_Column]);60)

     

    Or create a DAX Column like this, with text format:

     

    Minutes_Seconds = CONCATENATE(HOUR(Table[Time_Column])*60 + MINUTE(Table[Time_Column]);
                                  CONCATENATE(":"; 
    SECOND(Table[Time_Column])
    )
    )

    Regards.

     

     

     

  • Anonymous's avatar
    Anonymous
    8 years ago

    Hi orischmann9291,

     

    Change this semicolon to a comma, that should work.

     

    Regards.

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi orischmann9291,

     

    You can create a DAX Column Minutes so you can perform calculations with it:

     

     

    Minutes = HOUR(Table[Time_Column])*60 + 
    MINUTE(Table[Time_Column]) +
    DIVIDE(SECOND(Table[Time_Column]);60)

     

    Or create a DAX Column like this, with text format:

     

    Minutes_Seconds = CONCATENATE(HOUR(Table[Time_Column])*60 + MINUTE(Table[Time_Column]);
                                  CONCATENATE(":"; 
    SECOND(Table[Time_Column])
    )
    )

    Regards.

     

     

     

    • orischmann9291's avatar
      orischmann9291
      Frequent Visitor

      Hi Anonymous

       

      I tried your first option and am getting a message telling me the syntax for ; is incorrect.  Is this something that I could have incorrectly entered wrong?

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi orischmann9291,

         

        Change this semicolon to a comma, that should work.

         

        Regards.