Manufacturing analytics requires a specific set of KPIs and DAX patterns that differ from standard business reporting. OEE, yield rate, cycle time efficiency, scrap rate, first pass yield, and capacity utilisation each require precise definitions and carefully structured DAX to calculate correctly across shifts, lines, and time periods.
This guide provides production-ready DAX formulas for the 10 most important manufacturing KPIs in Power BI — formulas that CodePlateau's implementation team has validated across automotive, FMCG, pharmaceutical, and industrial manufacturing deployments in India.
Data Model Prerequisites
The following DAX measures assume a star schema with these core tables:
- FactProduction: ProductionOrderID, MachineID, ShiftID, DateKey, StartTime, EndTime, PlannedUnits, GoodUnits, ScrapUnits, ReworkUnits, ActualCycleTimeSeconds
- FactDowntime: DowntimeID, MachineID, ShiftID, DateKey, StartTime, EndTime, DowntimeReasonID, DurationMinutes
- DimMachine: MachineID, MachineName, Line, Department, Plant, IdealCycleTimeSeconds, NominalCapacityPerShift
- DimShift: ShiftID, ShiftName, PlannedMinutes
- DimDate: Standard date dimension with IsWorkingDay flag
1. Overall Equipment Effectiveness (OEE)
-- Availability: actual run time / planned production time
Availability =
DIVIDE (
[Actual Run Time (min)],
[Planned Production Time (min)],
0
)
-- Performance: ideal cycle time × total units / actual run time
Performance =
DIVIDE (
SUMX (
FactProduction,
FactProduction[TotalUnits] * RELATED ( DimMachine[IdealCycleTimeSeconds] ) / 60
),
[Actual Run Time (min)],
0
)
-- Quality: good units / total units
Quality =
DIVIDE (
SUM ( FactProduction[GoodUnits] ),
SUM ( FactProduction[GoodUnits] ) + SUM ( FactProduction[ScrapUnits] ),
0
)
-- OEE
OEE =
[Availability] * [Performance] * [Quality]
2. Planned vs Actual Production
Planned Units =
SUM ( FactProduction[PlannedUnits] )
Actual Good Units =
SUM ( FactProduction[GoodUnits] )
Production Achievement % =
DIVIDE (
[Actual Good Units],
[Planned Units],
0
)
Production Variance Units =
[Actual Good Units] - [Planned Units]
3. First Pass Yield (FPY)
First Pass Yield measures the percentage of units that complete the production process and meet quality standards without any rework. It is a more stringent quality metric than overall Quality Rate, because reworked units count against FPY even if they eventually pass inspection.
First Pass Yield =
DIVIDE (
SUM ( FactProduction[GoodUnits] ),
SUM ( FactProduction[GoodUnits] )
+ SUM ( FactProduction[ScrapUnits] )
+ SUM ( FactProduction[ReworkUnits] ),
0
)
-- FPY trend: 7-day moving average
FPY 7D Moving Average =
AVERAGEX (
DATESINPERIOD ( 'Date'[Date], LASTDATE ( 'Date'[Date] ), -7, DAY ),
[First Pass Yield]
)
4. Scrap Rate
Scrap Rate =
DIVIDE (
SUM ( FactProduction[ScrapUnits] ),
SUM ( FactProduction[GoodUnits] ) + SUM ( FactProduction[ScrapUnits] ),
0
)
Scrap Cost =
SUM ( FactProduction[ScrapUnits] ) * RELATED ( DimProduct[MaterialCostPerUnit] )
-- Scrap by reason (for Pareto analysis)
Scrap by Reason =
CALCULATE (
SUM ( FactScrapDetails[ScrapUnits] ),
ALLEXCEPT ( FactScrapDetails, DimScrapReason[ReasonDescription] )
)
5. Cycle Time Efficiency
Cycle time efficiency compares actual cycle time to the ideal (standard) cycle time. Values above 100% indicate faster-than-ideal production (usually a data issue); values below 100% indicate speed losses.
Actual Avg Cycle Time (sec) =
AVERAGEX (
FactProduction,
FactProduction[ActualCycleTimeSeconds]
)
Ideal Cycle Time (sec) =
RELATED ( DimMachine[IdealCycleTimeSeconds] )
Cycle Time Efficiency =
DIVIDE (
[Ideal Cycle Time (sec)],
[Actual Avg Cycle Time (sec)],
0
)
Cycle Time Variance (sec) =
[Actual Avg Cycle Time (sec)] - [Ideal Cycle Time (sec)]
6. Capacity Utilisation
Theoretical Max Units =
SUMX (
DimMachine,
DimMachine[NominalCapacityPerShift]
* COUNTROWS (
RELATEDTABLE ( FactProduction )
)
)
Capacity Utilisation =
DIVIDE (
[Actual Good Units],
[Theoretical Max Units],
0
)
7. Mean Time Between Failures (MTBF)
MTBF measures the average time between unplanned machine failures — a key indicator of equipment reliability and maintenance effectiveness.
Unplanned Downtime Events =
CALCULATE (
COUNTROWS ( FactDowntime ),
DimDowntimeReason[ReasonCategory] = "Unplanned"
)
Total Planned Run Time (hrs) =
DIVIDE ( [Planned Production Time (min)], 60 )
MTBF (hrs) =
DIVIDE (
[Total Planned Run Time (hrs)],
[Unplanned Downtime Events],
0
)
8. Mean Time To Repair (MTTR)
Total Unplanned Downtime (min) =
CALCULATE (
SUM ( FactDowntime[DurationMinutes] ),
DimDowntimeReason[ReasonCategory] = "Unplanned"
)
MTTR (min) =
DIVIDE (
[Total Unplanned Downtime (min)],
[Unplanned Downtime Events],
0
)
9. Shift-Level Performance Comparison
Comparing OEE and quality metrics across shifts reveals systemic issues — a consistently lower-performing night shift, for example, may indicate training gaps or maintenance scheduling problems.
Shift OEE Comparison =
CALCULATE (
[OEE],
ALLEXCEPT ( FactProduction, DimShift[ShiftName] )
)
Best Shift OEE =
MAXX (
VALUES ( DimShift[ShiftName] ),
CALCULATE ( [OEE] )
)
Shift OEE vs Best =
[OEE] - [Best Shift OEE]
10. Rolling 30-Day Production Trend
Production Last 30 Days =
CALCULATE (
SUM ( FactProduction[GoodUnits] ),
DATESINPERIOD (
'Date'[Date],
LASTDATE ( 'Date'[Date] ),
-30,
DAY
)
)
OEE Last 30D =
CALCULATE (
[OEE],
DATESINPERIOD (
'Date'[Date],
LASTDATE ( 'Date'[Date] ),
-30,
DAY
)
)
OEE 30D vs Prior 30D =
VAR Current = [OEE Last 30D]
VAR Prior =
CALCULATE (
[OEE],
DATESINPERIOD (
'Date'[Date],
LASTDATE ( DATEADD ( 'Date'[Date], -30, DAY ) ),
-30,
DAY
)
)
RETURN DIVIDE ( Current - Prior, Prior, 0 )
Building the Manufacturing KPI Dashboard
With these measures in place, the recommended dashboard structure for a plant manager:
- Page 1 — Executive Summary: OEE, FPY, Scrap Rate, MTBF as KPI cards with traffic-light formatting. 30-day trend line for OEE. Top 5 downtime reasons Pareto.
- Page 2 — Machine Performance: OEE by machine heatmap, Cycle Time Efficiency by machine, Capacity Utilisation by line.
- Page 3 — Shift Analysis: All KPIs broken by shift. Shift comparison bar charts. Shift-level trend over time.
- Page 4 — Quality Detail: First Pass Yield trend, Scrap by reason Pareto, Rework rate by product, Defect map by production stage.



