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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors