Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
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 April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
72 | |
67 | |
65 | |
42 | |
42 |
User | Count |
---|---|
46 | |
38 | |
28 | |
26 | |
26 |