Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
adi1234
New Member

Convert number to Time

I have a column which is in below whole number format.

Time in hrs
1
3
11
12
23
24

 

I want this to convert it to HH:MM:SS. Is this possible?

3 ACCEPTED SOLUTIONS
manvishah17
Solution Supplier
Solution Supplier

Hi @adi1234 ,
You can created Calculated Column using this 

ConvertedTime =
VAR Hours = CourseEnrollments[CourseID]
RETURN
FORMAT(Hours / 24, "HH:mm:ss")
Screenshot 2024-09-24 151228.png

View solution in original post

suparnababu8
Super User
Super User

Hi @adi1234 

Use TIME dax function to create Calculated Column by using following DAX function.

 

 

   TimeHHMMSS = TIME([Time in hrs], 0, 0)
   

 

 

Go through this Microsoft documentation about TIME dax - https://learn.microsoft.com/en-us/dax/time-function-dax

 

Hope this works for you!

 

View solution in original post

Anonymous
Not applicable

Hi @adi1234 ,

 

At first you may get a calculated column of date time type, you can modify the data type to time to modify the format to “hh:nn:ss” to get the expected output.

vcgaomsft_0-1727226613229.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @adi1234 ,

 

At first you may get a calculated column of date time type, you can modify the data type to time to modify the format to “hh:nn:ss” to get the expected output.

vcgaomsft_0-1727226613229.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum 

suparnababu8
Super User
Super User

Hi @adi1234 

Use TIME dax function to create Calculated Column by using following DAX function.

 

 

   TimeHHMMSS = TIME([Time in hrs], 0, 0)
   

 

 

Go through this Microsoft documentation about TIME dax - https://learn.microsoft.com/en-us/dax/time-function-dax

 

Hope this works for you!

 

manvishah17
Solution Supplier
Solution Supplier

Hi @adi1234 ,
You can created Calculated Column using this 

ConvertedTime =
VAR Hours = CourseEnrollments[CourseID]
RETURN
FORMAT(Hours / 24, "HH:mm:ss")
Screenshot 2024-09-24 151228.png

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.