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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.