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.
Hi All,
Wondering if you could help?
I have a column of time stamps for Duration in Heart rate zone and managed to convert it into minutes and seconds using the formula: HOUR(TBLHR[Aerobic zone 1 (hh:mm:ss)])*60+MINUTE(TBLHR[Aerobic zone 1 (hh:mm:ss)])+SECOND(TBLHR[Aerobic zone 1 (hh:mm:ss)])/60 which has been working fine - ie 00:16:47 = 16.783.
However, my athletes and some colleagues are finding this difficult to understand and would rather see the number as 16.47 (actual minutes and actual seconds in number form) for the ease of understanding.
Is there a way of doing this converstion easy?
Really appreciate any help on this.
Solved! Go to Solution.
Hi @SportStudent ,
Maybe you could add some text to identify like this:
To do this, add a Second Column using the following formula:
secondColumn =
HOUR ( 'TBLHR'[Aerobic zone 1 (hh:mm:ss)] ) * 3600
+ MINUTE ( 'TBLHR'[Aerobic zone 1 (hh:mm:ss)] ) * 60
+ SECOND ( 'TBLHR'[Aerobic zone 1 (hh:mm:ss)] )
Then create a measure based on the new column:
Measure =
VAR TotalSeconds =
MAX ( 'TBLHR'[secondColumn] )
VAR Hors =
TRUNC ( ( TotalSeconds ) / 3600 )
VAR Mins =
TRUNC ( MOD ( TotalSeconds, 3600 ) / 60 )
VAR Secs =
MOD ( TotalSeconds, 60 )
RETURN
IF ( Hors < 10, "0" & Hors, Hors ) & "h"
& IF ( Mins < 10, "0" & Mins, Mins ) & "m"
& IF ( Secs < 10, "0" & Secs, Secs ) & "s"
Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.
Best Regards,
Eyelyn Qin
Hi @SportStudent ,
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.
Best Regards,
Eyelyn Qin
Hi Eyelyn,
Apologies for my delay - I only just saw the notification - thank you for your help, it worked perfectly!
Kindest,
Sport Student
Hi @SportStudent ,
Maybe you could add some text to identify like this:
To do this, add a Second Column using the following formula:
secondColumn =
HOUR ( 'TBLHR'[Aerobic zone 1 (hh:mm:ss)] ) * 3600
+ MINUTE ( 'TBLHR'[Aerobic zone 1 (hh:mm:ss)] ) * 60
+ SECOND ( 'TBLHR'[Aerobic zone 1 (hh:mm:ss)] )
Then create a measure based on the new column:
Measure =
VAR TotalSeconds =
MAX ( 'TBLHR'[secondColumn] )
VAR Hors =
TRUNC ( ( TotalSeconds ) / 3600 )
VAR Mins =
TRUNC ( MOD ( TotalSeconds, 3600 ) / 60 )
VAR Secs =
MOD ( TotalSeconds, 60 )
RETURN
IF ( Hors < 10, "0" & Hors, Hors ) & "h"
& IF ( Mins < 10, "0" & Mins, Mins ) & "m"
& IF ( Secs < 10, "0" & Secs, Secs ) & "s"
Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.
Best Regards,
Eyelyn Qin
@SportStudent , Refer how can use duration
Duration
https://radacad.com/calculate-duration-in-days-hours-minutes-and-seconds-dynamically-in-power-bi-usi...
https://social.technet.microsoft.com/wiki/contents/articles/33644.powerbi-aggregating-durationtime-i...
https://www.pbiusergroup.com/communities/community-home/digestviewer/viewthread?GroupId=547&MessageK...
https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389
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 |
---|---|
109 | |
101 | |
86 | |
77 | |
69 |
User | Count |
---|---|
120 | |
108 | |
98 | |
83 | |
77 |