The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
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
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
77 | |
71 | |
48 | |
39 |
User | Count |
---|---|
137 | |
108 | |
69 | |
64 | |
58 |