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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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