Forum Discussion
converting a number to time/duration
Hey PBI Community,
I'm looking to convert a number into time, but it's not that straight forward.
I have a table that contains 3 columns:
1) Date
2) a value dynamically pulled from an excel spreadsheet.
3) Calculated column (described below)
I have then created a calculated column where I divide column 2 by the end result of a measure. Then result as it stands is outputted as a decimal.
Is there any way at all to convet this deciamal into time in HH:MM format?
I've watched numerous videos and can't even get close.
I've attached a pic of the table and included an excel spreadsheet where I show the desired result.
| Date | 4S packs per day FF | FF daily total / past 5 measure | Column C converted to HH:MM:SS |
| 25-Oct-22 | 30464 | 7.86 | 07:56:36 |
| 26-Oct-22 | 30000 | 7.74 | 07:44:24 |
| 27-Oct-22 | 31000 | 8 | 08:00:00 |
| 28-Oct-22 | 17000 | 4.39 | 04:23:23 |
| 29-Oct-22 | |||
| 30-Oct-22 | |||
| 31-Oct-22 | 29000 | 7.48 | 07:28:48 |
| 01-Nov-22 | 31000 | 8 | 08:00:00 |
| 02-Nov-22 | 29000 | 7.48 | 07:28:48 |
| 03-Nov-22 | 22000 | 5.68 | 05:40:48 |
| 04-Nov-22 | 29000 | 7.48 | 07:28:48 |
Sorry I didn't see that you had the value in a calculated column, anyway the procedure is similar:
3 Replies
- Bifinity_75
Solution Sage
Sorry I didn't see that you had the value in a calculated column, anyway the procedure is similar:
- Bifinity_75
Solution Sage
Hi sgilmore, try this:
In Power Query multiply Time by 0.0416666666666668:
After Transform Column in Hours Format:
Result:
Best regards
- AnonymousNot applicable
Bifinity_75 thank you very much worked perfectly!