cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper I

## DAX _ 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 rate.
Example : I have 4 available desks in a month, and 12 people did reservation for a month (number of reservation).
So when I calculate the rate = DIVIDE( Number of reservation, Available desk), it gives a wrong data as 300%.

Could anyone help how to fix this kind of evaluation context problem in DAX ?
Here is my data model :

3 REPLIES 3
Super User

@Randcharles , 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)
)

Then create measure for monthly
MonthlyOccupancyRate =
AVERAGEX (
VALUES(DateTable[Date]),
[DailyOccupancyRate]
)

 Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!

Helper I

Hi @bhanu_gautam ,

Thank you for help.
But it seems that it doesn't fit with my need.

Community Support

Hi @Randcharles ,

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 Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

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

#### Fabric Community Update - August 2024

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

Top Solution Authors
Top Kudoed Authors