Forum Discussion

Faber13's avatar
Faber13
Icon for Helper II rankHelper II
4 years ago
Solved

HOURS, MINUTES AND SECONDS

Hi everyone,

 

i need support with the case below.

 

was to add a minute when it was 60 seconds and leave the seconds at 0 

 

"Tempo Chegada DMC" is a decimal column and "total horas chegada decimal" it's a sum of it.

 

The correct Would Be 12:17:00 and 10:54:00

 

 

 

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Faber13 ,

     

    If [Horas Chegada HH:MM:SS] is a calculated column, you can try to create a new calculated column.

    Column 2 = IF(VALUE(RIGHT([Column],2))=60,[Column]+40)

     

    If [Horas Chegada HH:MM:SS] is a measure, try to create a new measure.

    Measure = IF(VALUE(RIGHT([Horas Chegada HH:MM:SS],2))=60,[Horas Chegada HH:MM:SS]+40)
    

     

    The solution is that their essence is still a decimal number, judging the two digits at the end, and adding and subtracting them.

     

    You can download the pbix file for more details.

     

    Best Regards,

    Stephen Tao

     

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

3 Replies

  • Faber13 , You should put your HH , MM and SS to time function it should correct

     

    Time([HH], [MM],[SS])

     

    If needed as string format

     

    format(,Time([HH], [MM],[SS]) , "HH:MM:SS" )

    • Faber13's avatar
      Faber13
      Icon for Helper II rankHelper II

      Hi  Amitchandak Thanks for the answer,

       

      it didn't work, it still has the same problem and I need it in number format to use in graphics

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Faber13 ,

     

    If [Horas Chegada HH:MM:SS] is a calculated column, you can try to create a new calculated column.

    Column 2 = IF(VALUE(RIGHT([Column],2))=60,[Column]+40)

     

    If [Horas Chegada HH:MM:SS] is a measure, try to create a new measure.

    Measure = IF(VALUE(RIGHT([Horas Chegada HH:MM:SS],2))=60,[Horas Chegada HH:MM:SS]+40)
    

     

    The solution is that their essence is still a decimal number, judging the two digits at the end, and adding and subtracting them.

     

    You can download the pbix file for more details.

     

    Best Regards,

    Stephen Tao

     

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