Forum Discussion
Time format export data from hours to decimal
- 6 years ago
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
I have uploaded the BI file with limited data in it.
The report has 2 tables and 2 queries. "06 cut" was a direct csv import. query1 was a sharepoint link where I deliberately had a value greater than 24 hours in it. This is where I think Power BI get confused. data and BI file
[edit] - I have decided to get rid of the two imports and do everything from sharepoint. i hope this will then result in a single combined table straight away and only one format applied to the column. I will update once I have tried this. (I am busy doing my day job at the same time)
to come back to this thread.
For entries that are less than 24 hours 24:00 the following works.
import the data as a combined sharepoint csv load.
change column format to Date/Time
Make a new column = 24 * [time column]
you get a column of decimal values.
HOWEVER: If the entry is 24:00 exactly or greater it falls over and BI will not parse it.
In my data set I currently have 23 entries that are like this. I do not see a way for me to fix these 23 errors. Any help greatly appreciated