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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
aromero28
New Member

PROBLEM GROUPING HOUR BY 15 MIN

 

I'm having several issues.

I need to be able to group by 15 or 30-minute intervals.

I have a table with a column "hour" with the exact hour and minute, and since there are many rows with different hours and minutes, I need to group them to make it easier to visualize.

I've been looking at old posts, but I can't get it to let me select the "hour" column.

 
 

TEST.PNG

 

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

Hi, @aromero28 

Thanks for @lbendlin reply. You can try the following MDX to solve the problem. 

vyaningymsft_0-1716172691278.png

 

 

= Table.AddColumn(#"Changed Type", "Custom", each Time.From(Number.RoundDown(Number.From(Time.From([Time]))*(24*60/15))/(24*60/15)))

 


Related links:
How to categorize and group data in time intervals with Power Query - Data Cornering
Power BI: Separating a Duration into 15-Minute Intervals (devcodef1.com)

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

2 REPLIES 2
v-yaningy-msft
Community Support
Community Support

Hi, @aromero28 

Thanks for @lbendlin reply. You can try the following MDX to solve the problem. 

vyaningymsft_0-1716172691278.png

 

 

= Table.AddColumn(#"Changed Type", "Custom", each Time.From(Number.RoundDown(Number.From(Time.From([Time]))*(24*60/15))/(24*60/15)))

 


Related links:
How to categorize and group data in time intervals with Power Query - Data Cornering
Power BI: Separating a Duration into 15-Minute Intervals (devcodef1.com)

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

lbendlin
Super User
Super User

Remember that time values are fractions. Multiply the time value by 96  (for 15 minute intervals), Round down, then divide by 96 again. That will give you the desired 15 minute buckets.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.