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
harishuppala2
Frequent Visitor

Rounding of datetime to every 3 hours in a day Power BI

TestTimeTestTime3h
11/10/2019 6:00AM11/10/2019 6:00AM
11/10/2019 8:00AM11/10/2019 9:00AM

My requirement is to group fields for every 3 hours ,I am trying to use the below DAX formula

Formula for TestTime3h = MROUND(JSAutomation_loading_temp[TestTime], TIME(3,0,0)) + TIME(0,0,0). But I need 6-9 as 6 AM block. Please let me know.

2 REPLIES 2
kentyler
Solution Sage
Solution Sage

Do you have a calendar table ? You might have an "Hours" table that had one entry for every hour in the day. Then a column that listed the "hour block". You could link that table to the TestTime and it would automatically give you the "hour block" by using the relationship.





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


3hour.PNG

@kentyler thanks for the quick reply, yes i have rounding to 1hr in my data but i wanted to group my date to every 3 hours 

meaning 12am-3am,3am-6am so on.

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.