Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
116 | |
99 | |
87 | |
35 | |
35 |
User | Count |
---|---|
152 | |
98 | |
81 | |
61 | |
55 |