Forum Discussion
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.
- Anonymous2 years ago
Hi, Anonymous
Thanks for lbendlin reply. You can try the following MDX to solve the problem.= 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 TeamIf 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
2 Replies
- lbendlin
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.
- AnonymousNot applicable
Hi, Anonymous
Thanks for lbendlin reply. You can try the following MDX to solve the problem.= 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 TeamIf 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