I come to you with the following challenge. I need to do a KPI on Power BI related to maintenance sector -calculate the Availability of certain machine -. The formula to calculate is the following one:
Availability (fip, ftp) = Working time in period fip-ftp /Total Operating Time, where:fip = initial date of evaluation, ftp = final date of evaluation. Working Time = Total Operating Time in period fip - ftp - Downtime in period fip - ftp. Total Operatinal Time = Working Time of Machine in a day * (ftp-fip) (ftp-fip) = delta time of evaluation
As you can see i need to see the Availability between fip and ftp, be available to "play" with this date (it will be great to do using a slider in Power Bi, and the KPI changes depending the dates).
Soo, in order to do this i have the date in this format:
For example, if i want to get the KPI for Machine A and B for:fip = 01/07/2019 and ftp=20/12/2019 you will notice that fip date selected happens before Detention Date and ftp is before Start Date, soo the Availability for each maquine it will be:
As you notice you will have multiple cases, but the case asume that if a machine has a failure it can´t operate until is fixed. The cases that i need to program are the following:
A) Detention Date <fip and Start Date <fip, that a means that the time down is 0.
B) Detention Date <fip and Start Date >fip, that a means that the time down is Start Date - fip.
C) Detention Date >fip and Start Date <ftp, that a means that the time down is Start Date - Detentión Date.
D) Detention Date >fip and Start Date >ftp, that a means that the time down is Start Date - ftp.
I need to program in power bi with the idea of using a slicer so the user can see de Availability on any period of time. Any help is gratefully appreciated.