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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

How to change decimal to time format (HH:MM:SS)

Hello guys, I encountered some problems while working with time-based data. 

I would like to round down (floor) the "time" column to 15mins and the returned results are in decimal format. I wonder how to change them to time format just like the "time column" 

 

Thanks for your help and time!

 
1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

Use  below dax expression to create a calculated column:

 

floor = 
var a =FLOOR(MINUTE('Table'[Time]),15)
Return
TIME(HOUR('Table'[Time]),a,SECOND('Table'[Time]))

 

And you will see:

Annotation 2020-04-20 110442.png

You can also create  a measure to achieve it.

 

Measure = 
var a=FLOOR(MINUTE(SELECTEDVALUE('Table'[Time])),15)
Return
TIME(HOUR(SELECTEDVALUE('Table'[Time])),a,SECOND(SELECTEDVALUE('Table'[Time])))

 

 

And you will see:

Annotation 2020-04-20 111327.png

For the related .pbxi file,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

View solution in original post

4 REPLIES 4
v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

Use  below dax expression to create a calculated column:

 

floor = 
var a =FLOOR(MINUTE('Table'[Time]),15)
Return
TIME(HOUR('Table'[Time]),a,SECOND('Table'[Time]))

 

And you will see:

Annotation 2020-04-20 110442.png

You can also create  a measure to achieve it.

 

Measure = 
var a=FLOOR(MINUTE(SELECTEDVALUE('Table'[Time])),15)
Return
TIME(HOUR(SELECTEDVALUE('Table'[Time])),a,SECOND(SELECTEDVALUE('Table'[Time])))

 

 

And you will see:

Annotation 2020-04-20 111327.png

For the related .pbxi file,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

TomMartens
Super User
Super User

Hey @Anonymous ,

 

I use this approach to put time values into a bucket, the below DAX statement Is used to create a calculated column:

 

floored time = 
var h = HOUR('Table'[Time])
var m = FLOOR(MINUTE('Table'[Time]) , 15)
var s = 0
var flooredtime = TIME(h , m , s)
return flooredtime

 

This is the result:

image.png

Hopefully, this provides what you are looking for.

 

Regards,

Tom

 

Stay safe, stay healthy



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
amitchandak
Super User
Super User

Duration.minute can help to floor

https://docs.microsoft.com/en-us/powerquery-m/duration-minutes

Decimal to HH:MM:SS

https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389
Refer: https://community.powerbi.com/t5/Desktop/Convert-Decimal-Duration-in-HH-MM-SS-format/m-p/959061

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Please find the captured screen below.

Capture.PNG

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.

Top Solution Authors
Top Kudoed Authors