Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

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. 

 

 

 

Date4S packs per day FFFF daily total / past 5 measureColumn C
converted
to HH:MM:SS
25-Oct-22304647.8607:56:36
26-Oct-22300007.74

07:44:24

27-Oct-2231000808:00:00
28-Oct-22170004.3904:23:23
29-Oct-22   
30-Oct-22   
31-Oct-22290007.4807:28:48
01-Nov-2231000808:00:00
02-Nov-22290007.4807:28:48
03-Nov-22220005.6805:40:48
04-Nov-22290007.4807:28:48

 

 

  • Sorry I didn't see that you had the value in a calculated column, anyway the procedure is similar:

     

     

3 Replies

  • Sorry I didn't see that you had the value in a calculated column, anyway the procedure is similar:

     

     

  • Hi sgilmore, try this:

     

    In Power Query multiply Time by 0.0416666666666668:

    After Transform Column in Hours Format:

     

    Result:

     

    Best regards