Forum Discussion
Room Utilization by Day and Hour
- 5 years ago
Hi, tsupani
According to your expected result, I think what can be achieved in Power BI is the data part, this is the result I can achieve:
What’s more, I don’t think the detailed data(room number and time period) can also be displayed in Power BI Matrix, I suggest you to accept this reply as a solution and open a new case to ask this question so that more exports can research whether this can be achieved in Power BI.
This is my test pbix file according to your expected result(My steps is similar to the steps I mentioned before):
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, tsupani
- According to your expected result, you want to create a matrix to calculate utilization (%) by day and hour, you can follow my steps:
- Create a calculated column [Time], then change the [Time] column to time type:
Time =
var _hour=GENERATESERIES(8,16,1)
return SELECTCOLUMNS(_hour,"Time",TIME([Value],0,0))
- Create a measure in the main table:
utilization =
var _allrooms=
CALCULATE(DISTINCTCOUNT('Table'[Room]),ALL('Table'))
var _usedrooms=
CALCULATE(
COUNT('Table'[Room]),
FILTER(ALLSELECTED('Table'),
[Start Time]<=MAX('Time'[Time])&&[End Time]>=MAX('Time'[Time])&&[Meeting Day]=MAX('Table'[Meeting Day])))
var _utilization=
DIVIDE(_usedrooms,_allrooms)
return
IF(_utilization=BLANK(),0,_utilization)
- Change the measure format to “Percentage” and create a Matrix and place columns like this:
And you can get what you want.
You can download my test pbix file here
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- tsupani5 years agoNew Member
Thanks for taking the time to find out the solution. 🙂
Sorry I wasn't clear about my communication on the first post. Your proposed solution seems to move in the right direction but still doesn't meet certain requirements. In particular, I hope to see the utilization by day (including M, T, W, R, and F) instead of the meeting day patterns (e.g., M, MW, MWF, etc.) and by the hour from 8 AM - 4 PM (e.g., 8:01 am - 9:00 am, 9:01 am - 10:00 am, etc.).