Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I would like to change the time format from hh:mm:s to hh:mm:ss.
I used the following measure:
But I would like to see the 0 before the number when the seconds don't reach 10. Something like this:
03:14
03:16
03:04
03:08
What measure should I use to get it?
Thanks in advance for your help!
Solved! Go to Solution.
HI @Anonymous ,
You can update your code like this:-
PCR =
VAR vSeconds = 'Medidas'[Average]
VAR vMinutes =
INT ( vSeconds / 60 )
VAR vRemainingSeconds =
INT ( MOD ( vSeconds, 60 ) )
VAR vHours =
INT ( vMinutes / 60 )
VAR vRemainingMinutes =
MOD ( vMinutes, 60 )
RETURN
vHours & vRemainingMinutes & ":"
& IF ( vRemainingSeconds < 9, "0" & vRemainingSeconds, vRemainingSeconds )
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
HI @Anonymous ,
You can update your code like this:-
PCR =
VAR vSeconds = 'Medidas'[Average]
VAR vMinutes =
INT ( vSeconds / 60 )
VAR vRemainingSeconds =
INT ( MOD ( vSeconds, 60 ) )
VAR vHours =
INT ( vMinutes / 60 )
VAR vRemainingMinutes =
MOD ( vMinutes, 60 )
RETURN
vHours & vRemainingMinutes & ":"
& IF ( vRemainingSeconds < 9, "0" & vRemainingSeconds, vRemainingSeconds )
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
100 | |
100 | |
80 | |
77 | |
66 |
User | Count |
---|---|
134 | |
106 | |
104 | |
85 | |
73 |