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 created a summarized table and am trying to convert an average time value (Average Hour Time in this case) to a time format (HH:MM:SS). See Screenshot:
So 12.11 for Medicine Emory A should convert to roughly 12:07.
Any help will be greatly appreciated.
Solved! Go to Solution.
Hi @ranis1227 ,
You can try this method:
New a measure:
Average_Time =
var _hours = ROUNDDOWN(SUM('Table'[Average Hour Time]), 0)
var _minutes = (SUM('Table'[Average Hour Time]) - _hours) * 60
var _seconds = (_minutes - ROUNDDOWN(_minutes, 0)) * 60
return
TIME(_hours, _minutes, _seconds)
Need to change the type here:
The result is:
Hope this helps you. Here is my PBIX file.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ranis1227 ,
You can try this method:
New a measure:
Average_Time =
var _hours = ROUNDDOWN(SUM('Table'[Average Hour Time]), 0)
var _minutes = (SUM('Table'[Average Hour Time]) - _hours) * 60
var _seconds = (_minutes - ROUNDDOWN(_minutes, 0)) * 60
return
TIME(_hours, _minutes, _seconds)
Need to change the type here:
The result is:
Hope this helps you. Here is my PBIX file.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ranis1227
Check out the below links and you will find how to convert your number to time:
https://community.powerbi.com/t5/Desktop/Convert-Decimal-Duration-in-HH-MM-SS-format/m-p/959061
https://community.powerbi.com/t5/Power-Query/How-to-convert-decimal-time-to-hh-mm-and-summarize-that...
https://www.myonlinetraininghub.com/converting-decimal-time-to-days-hours-minutes-in-power-bi
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
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 |
---|---|
18 | |
18 | |
17 | |
15 | |
12 |
User | Count |
---|---|
35 | |
34 | |
19 | |
18 | |
14 |