Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I am looking to create a utiization chart based on room utilization. The room will have a sum of the amount of hours used and I want to divide this by the total possible hours in a month to get the utilization %. This part is working fine. However, when I drill up to a year, the math is off because the dividing number is not large enough (Needs to be multiplied by 12). Is there a way to make this work with a single formula that changes based on the Date view of Month or Year?
@jcarter0713 , You can get month of the date in context using
Month(Max(Date[Date]))
other ways
or
Utilization % =
VAR CurrentLevel = ISINSCOPE('Date'[Year]) + ISINSCOPE('Date'[Month])
VAR HoursUsed = SUM('RoomData'[HoursUsed])
VAR TotalHours =
SWITCH(
CurrentLevel,
2, EOMONTH(MAX('Date'[Date]), 0) - EOMONTH(MIN('Date'[Date]), -1) + 1, // Monthly level
1, 365 * (YEAR(MAX('Date'[Date])) - YEAR(MIN('Date'[Date])) + 1), // Annual level
BLANK()
)
RETURN
IF(
NOT ISBLANK(TotalHours),
HoursUsed / TotalHours,
BLANK()
)