cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
creynolds
Helper V
Helper V

Date/Time as Duration

I have an Excel export that I've successfully converted the date/time to a duration I can use to calculate time spent on projects.   However, time over 24 hours in the data table shows "error".   What is the best way to convert time for entries over 24 hours?

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @creynolds 

what does the column [Minutes] represent to? 2.67 day? if so, you need to convert 2.67 day to minutes firstly, minutes = 2.67*24*60, then you can put it into the code template.

vxiaotang_0-1634277556871.png

for example,

vxiaotang_1-1634277941291.png

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-xiaotang
Community Support
Community Support

Hi @creynolds 

what does the column [Minutes] represent to? 2.67 day? if so, you need to convert 2.67 day to minutes firstly, minutes = 2.67*24*60, then you can put it into the code template.

vxiaotang_0-1634277556871.png

for example,

vxiaotang_1-1634277941291.png

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

The add'l calculation is what I was missing.   It is now working!    Thanks.

creynolds
Helper V
Helper V

I have tried multiple ways using the instructions provided, but still can not seem to get this to work.   Here is an example using the instructions.   I have tried multiple variations, including Extract data before/after in Power Query, to no avail.    I've attached screen shots of the source and the PBI output.

 

Any suggestions are greatly appreciated.

 

Screenshot PBI.pngScreenshot Source.png

amitchandak
Super User
Super User

@creynolds , If you are looking to add up duration you have to do try something similar to what has been explained in blogs

 

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...

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.