Forum Discussion
Multiple Cols Convert Txt HHH:MM:SS to Duration (Hrs)
- 3 years ago
Anonymous , You need to deal it with in calculation, hour will not display more than 24 hours
Best it is to split that in-power query into 3 columns
Duration
https://radacad.com/calculate-duration-in-days-hours-minutes-and-seconds-dynamically-in-power-bi-using-dax
https://social.technet.microsoft.com/wiki/contents/articles/33644.powerbi-aggregating-durationtime-in-dax.aspx
https://www.pbiusergroup.com/communities/community-home/digestviewer/viewthread?GroupId=547&MessageKey=814a2cb4-3cca-4cd1-a620-c467adeaaaf6&CommunityKey=b35c8468-2fd8-4e1a-8429-322c39fe7110&tab=digestviewer
https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389 - Anonymous3 years ago
Hi Anonymous ,
According to your screenshot, I think your columns should be in text data type due to your hour is larger than 24. So we couldn't use Hour() to get hour value. Here I suggest you to use Split function to get hour value before first ":".
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous , You need to deal it with in calculation, hour will not display more than 24 hours
Best it is to split that in-power query into 3 columns
Duration
https://radacad.com/calculate-duration-in-days-hours-minutes-and-seconds-dynamically-in-power-bi-using-dax
https://social.technet.microsoft.com/wiki/contents/articles/33644.powerbi-aggregating-durationtime-in-dax.aspx
https://www.pbiusergroup.com/communities/community-home/digestviewer/viewthread?GroupId=547&MessageKey=814a2cb4-3cca-4cd1-a620-c467adeaaaf6&CommunityKey=b35c8468-2fd8-4e1a-8429-322c39fe7110&tab=digestviewer
https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389
Thanks, does that mean i need to split all colums? in Excel you can format [H],MM,SS to show more that 24hrs, can you not do this in Power BI?
- Anonymous3 years agoNot applicable
Hi Anonymous ,
According to your screenshot, I think your columns should be in text data type due to your hour is larger than 24. So we couldn't use Hour() to get hour value. Here I suggest you to use Split function to get hour value before first ":".
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.