Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

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 @Anonymous 

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 @Anonymous 

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.

Anonymous
Not applicable

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

Anonymous
Not applicable

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.