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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

How to convert the hh:mm:ss format into groups of time period like (5, 10, 30 minutes)?

I am facing an issue of converting the date given in hh:mm:ss format (timestamps) into group of different intervals.

The time data is in the given format.

 

3:12:11 PM value=46

3:12:12 PM value=47

3:12:13 PM value=48

.

.

3:17:00 PM value=55

I want to group the given time instances into 5, 10, 30 minutes periods and find the average of the corresponding time period.

 

output

3:12:00 to 3:17:00 value= average of all the values within that time period.

1 ACCEPTED SOLUTION
Thim
Resolver V
Resolver V

This should do the trick.

Time Grouped = TIME(HOUR(DateTimeTable[Time]);MINUTE(MROUND(DateTimeTable[Time]+1/24/60*3;1/24/60*5));00)
This part "1/24/60*5" is what decides the interval. in this case as it is *5 it is set for a 5 minute interval. change this number, if you want a different interval, or just make a column for each interval you want.
 
This part "1/24/60*3" is to make sure the original time gets in the right group. Just play around with it a bit, and see what fits you best. 🙂
 

Grouped Minutes.PNG

 

Hope this will help.

 

View solution in original post

1 REPLY 1
Thim
Resolver V
Resolver V

This should do the trick.

Time Grouped = TIME(HOUR(DateTimeTable[Time]);MINUTE(MROUND(DateTimeTable[Time]+1/24/60*3;1/24/60*5));00)
This part "1/24/60*5" is what decides the interval. in this case as it is *5 it is set for a 5 minute interval. change this number, if you want a different interval, or just make a column for each interval you want.
 
This part "1/24/60*3" is to make sure the original time gets in the right group. Just play around with it a bit, and see what fits you best. 🙂
 

Grouped Minutes.PNG

 

Hope this will help.

 

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