To understand the Availability calculation you will need some background:
The Shift_Data table is used to capture production output, which can either be captured by shift (so once at the end of the day; if two different types of products are made during the shift, there will be two records in this Shift_Data table for that shift) or by hour (so each hour is a new record in the shift data table).
The Availability measure uses the following calulation:
Availability = 1-
The "Downtime" shown above is a column from the Shift_Data table, while "Available_Time" is a calculated column shown below ("Type" indicates whether the data was captured hourly or by shift):
//this is the full hour/shift - planned downtime
//Hourly available time:
//Shiftly available time:
if([Find_last_entry_for_same_Shift]="MAX",LOOKUPVALUE('Shift_Setup'[Total Shift time],'Shift_Setup'[ID],[Shift_Setup_ID])-[Planned Downtime]
There is another table called "Shift_Setup" which gives the total time for a shift when data is captured by shift, which is what is being referenced above. The "Planned downtime" above comes from the Shift_Data table. The "
[Find_last_entry_for_same_Shift]="MAX"" part of the formula ensures that the shift time isn't duplicated if more than one product is recorded for that shift.
It is quite a complex model, so let me know if I must explain further.