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
Pmorg73
Post Patron
Post Patron

Time format export data from hours to decimal

formatting issue.png

 

I have an interesting query

 

I am working in time and invoice management web site called workflow max. To get data from the web site I export reports in csv format.

For small time entries the csv exports in a hh:mm format. But for the big ones in the image it is [h]:mm:ss. (image is a filtered view only)

This is happening when the sum of entries invoiced is greater than 24 hours. In the image there is a value of 300:48:00 and when I interogate the invoice that is 300 hours 48 mins.

Further complication, but should change any solution, is that I have an historic csv table up to 2020 and then append a 2020 csv from sharepoint so that the data will continue to grow and also reduce reporting out time from the source.

 

What I have been doing is creating a new column for decimal hours

 

I do know that to convert the hh:mm format to decimal in Power BI using csv I need "24 * [time]". Also if it is in xlsx format I need "24 * [time] - 24" to get a created column for decimal time. And decimal time will help with visuals and measures.

 

Question: What do I need to do in this case where I have a column with two time formats in the csv to get a single decimal time column?

1 ACCEPTED SOLUTION

In query editor. Select the column and split it by deliminator

You get two columns. 1 is hours, 1 is mins

New column = hours + (mins/60) = decimal number and works with values over 24 hours. 

 

KISS

View solution in original post

20 REPLIES 20

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.