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
You should use the Duration functions in M (Query Editor / Power Query)
Here is a link that desribes each of the fuctions. Note that they all should accept a time value as input.
Duration.TotalMinutes( Duration.From( [Time Column] ) ) will convert the entire time duration into minutes. 2 hours 3 minutes = 123 minutes.
I'm not sure the exact output you're looking for, but I would do all of your modeling in Query Editor to have a single, consistently formatted column for Power BI to work with.
Hope this helps,
~ Chris
Thanks for the guidance. And I will work further with this idea.
However when I close the query editor I get a column that is in a decimal looking format. Should I then do a DAX measure to format it in to hours etc?