Forum Discussion
Randcharles
Helper I
2 years agoDAX _ Calculate occupancy rate
Hi all, I have a report where I need to calculate occupancy rate : office reservation/ available desk. When I need to compute the global occupancy rate for a month or a week , it shows a wrong ...
bhanu_gautam
Super User
2 years agoRandcharles , For this first make sure you have one date table
Then Create a measure for Daily reservation
DailyReservations =
CALCULATE (
COUNTROWS(Reservations),
ALLEXCEPT(Reservations, Reservations[ReservationDate])
)
Then one more for Desk
DailyOccupancyRate =
DIVIDE (
[DailyReservations],
COUNTROWS(Desks)
)
DIVIDE (
[DailyReservations],
COUNTROWS(Desks)
)
Then create measure for monthly
MonthlyOccupancyRate =
AVERAGEX (
VALUES(DateTable[Date]),
[DailyOccupancyRate]
)
Randcharles
Helper I
2 years ago- Anonymous2 years agoNot applicable
Hi Randcharles ,
Your calculation is based on your data model and your tables. Please share a sample file with us.
We need to know how to calculate Number of reservation and Available desk.
You can also show us the result you want, this will make it easier to find the solution.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.