Display time over 24 hours in Power BI

ChloeSpurge

New Member
Joined
May 5, 2021
Messages
25
Office Version
  1. 2016
Platform
  1. Windows
Hi,

I have this pivot table in excel which sums weekly hours, then I've formatted it as [hh]:mm due to the sum being over 24 hours.

1645530167692.png


However when I import this table into power BI it will not let me change the time to be over 24 hours, matching the table above. Any ideas how I could makes the times correct (matching table above)? Maybe convert the decimal to a time?
1645530338881.png
1645530442401.png
 
It looks like you used the formula from post 8 instead of the one from post 4. The one in post 8 includes the functions that the PQ editor adds when you create a custom column, which is why you have ended up with a Table. The formula for the calculated column is just:


Power Query:
=Number.ToText(Number.RoundDown(Duration.TotalHours([HoursColumn]),0))&":"&Number.ToText(Number.RoundDown(Duration.Minutes([HoursColumn]),0))
 
Upvote 0
Solution

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
It looks like you used the formula from post 8 instead of the one from post 4. The one in post 8 includes the functions that the PQ editor adds when you create a custom column, which is why you have ended up with a Table. The formula for the calculated column is just:


Power Query:
=Number.ToText(Number.RoundDown(Duration.TotalHours([HoursColumn]),0))&":"&Number.ToText(Number.RoundDown(Duration.Minutes([HoursColumn]),0))
Thank you it worked!
 
Upvote 0
It looks like you used the formula from post 8 instead of the one from post 4. The one in post 8 includes the functions that the PQ editor adds when you create a custom column, which is why you have ended up with a Table. The formula for the calculated column is just:


Power Query:
=Number.ToText(Number.RoundDown(Duration.TotalHours([HoursColumn]),0))&":"&Number.ToText(Number.RoundDown(Duration.Minutes([HoursColumn]),0))
Hi, this works well, however when the time is say 5:05, 0.21 as a decimal, it comes out the formula as 5:50, is there any why to change this so it shows minutes under 10 as having a 0 before? eg 5:05, 6:09, 7:03 etc
 
Upvote 0
Yes, you can use:

Power Query:
=Number.ToText(Number.RoundDown(Duration.TotalHours([HoursColumn]),0))&":"&Number.ToText(Number.RoundDown(Duration.Minutes([HoursColumn]),0), "D2")
 
Upvote 0

Forum statistics

Threads
1,223,669
Messages
6,173,700
Members
452,527
Latest member
ineedexcelhelptoday

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top