Manufacturing Analytics in Power BI: OEE, Quality, and Throughput

Build a Power BI manufacturing dashboard covering OEE calculation, quality metrics, production throughput, downtime analysis, and SPC charts — with complete DAX formulas.

E
ECOSIRE Research and Development Team
|2026年3月19日7 分钟阅读1.4k 字数|

属于我们的Manufacturing in the AI Era系列

阅读完整指南

Power BI 中的制造分析:OEE、质量和吞吐量

世界一流的制造设施以 85% 以上的 OEE 运行。制造商的平均运行率为 60%。这 25 个百分点的差距直接转化为产能——设备 OEE 从 60% 提高到 85%,无需购买任何新机器或雇用任何人,产量就增加了 41%。世界一流和平均水平之间的区别几乎总是不在于设备,而在于发现浪费的可见性以及消除浪费的数据。

连接到 MES(制造执行系统)和 ERP 数据的 Power BI 提供了这种可见性。本指南构建了一个完整的制造分析平台,涵盖 OEE 计算、质量 SPC 图表、停机根本原因分析和吞吐量管理 - 以及制造工程师所需的精确 DAX 公式。

要点

  • OEE = 可用性 × 性能 × 质量(世界一流 = 85%+)
  • 每个 OEE 组件都需要单独的数据流:停机日志、生产计数、报废记录
  • Power BI 中的 SPC(统计过程控制)图表使用自定义视觉效果或计算的控制限
  • 停机帕累托分析(导致 80% 停机的前 20% 原因)推动优先改进
  • 首次合格率 (FPY) 和每百万机会缺陷数 (DPMO) 是关键质量 KPI
  • 吞吐量分析使用瓶颈理论比较实际容量与理论容量
  • Power BI 流数据集支持近乎实时的 OEE 仪表板每分钟更新一次
  • ERP 集成(Odoo Manufacturing、SAP PP、Dynamics 365 SCM)提供工作订单上下文

制造分析数据模型

核心制造表

生产运行(每个生产运行/工单一行):

专栏描述
代码0工单或生产运行 ID
代码0FK 至机器尺寸
代码0FK 到产品
代码0FK 到 Shift
代码0运行开始日期时间
代码0运行结束日期时间
代码0预定开始
代码0预定结束
代码0目标产量
代码0实际生产单位
代码0质量检查合格单位
代码0有缺陷的单位
代码0需要返工的单位
代码0设计速度下每单位秒数

Downtime_Events(每次停机一行):

专栏描述
代码0唯一ID
代码0FK 到机器
代码0FK 到生产运行(如果适用)
代码0停机开始
代码0停机时间结束
代码0总停机时间
代码0计划内(PM、转换)/计划外
代码0具体原因代码
代码0描述
代码0计划维护标志
代码0技术人员回复时间
代码0主动修复时间

Quality_Events(每个缺陷/检查一行):

专栏描述
代码0唯一ID
代码0FK 到生产运行
代码0FK 到机器
代码0检查日期/时间
代码0FK 到缺陷类型
代码0发现的缺陷数量
代码0受检单位
代码0变量测量(用于 SPC)
代码0布尔值 — 在公差范围内

昏暗机器

  • 代码0代码1代码2代码3代码4代码5代码6代码7

调暗_Shift

  • 代码0代码1代码2代码3代码4代码5

Power BI 中的 OEE 计算

OEE = 可用性 × 性能 × 质量

可用性

可用性=实际运行时间/计划生产时间

// Planned Production Time (from shift schedule minus planned downtime)
Planned Production Time =
SUMX(
    Production_Runs,
    DATEDIFF(Production_Runs[PlannedStartTime],
              Production_Runs[PlannedEndTime], MINUTE)
)

// Unplanned Downtime (excludes scheduled maintenance, changeovers)
Unplanned Downtime =
CALCULATE(
    SUM(Downtime_Events[DurationMinutes]),
    Downtime_Events[DowntimeCategory] = "Unplanned"
)

// Changeover Time (planned but reduces availability)
Changeover Time =
CALCULATE(
    SUM(Downtime_Events[DurationMinutes]),
    Downtime_Events[DowntimeReasonCode] = "CHANGEOVER"
)

// Actual Run Time
Actual Run Time = [Planned Production Time] - [Unplanned Downtime] - [Changeover Time]

// OEE Availability
Availability =
DIVIDE([Actual Run Time], [Planned Production Time], 0)

性能

性能 =(理想循环时间 × 总计数)/实际运行时间 或等效:实际输出/理论最大输出

// Theoretical Maximum Output at ideal run rate
Theoretical Max Output =
SUMX(
    Production_Runs,
    [Actual Run Time Per Run] / Production_Runs[IdealCycleTime]
)

// Actual total output (good + scrap + rework)
Total Output =
SUM(Production_Runs[ActualQuantity])

// OEE Performance
Performance =
DIVIDE([Total Output], [Theoretical Max Output], 0)

// Performance per machine (for benchmarking)
Machine Performance =
DIVIDE(
    SUMX(Production_Runs, Production_Runs[ActualQuantity]),
    SUMX(Production_Runs,
        DATEDIFF(Production_Runs[StartTime], Production_Runs[EndTime], MINUTE) /
        RELATED(Dim_Machine[IdealCycleTime]) * 60
    ),
    0
)

质量

质量 = 良品产量 / 总产量(排除所有缺陷)

// Good Quantity (first pass, no rework)
Good Quantity = SUM(Production_Runs[GoodQuantity])

// Total Quantity Produced (good + scrap + rework)
Total Quantity = SUM(Production_Runs[ActualQuantity])

// OEE Quality
Quality Rate =
DIVIDE([Good Quantity], [Total Quantity], 0)

// First Pass Yield (no rework, no scrap)
First Pass Yield =
DIVIDE(
    SUM(Production_Runs[GoodQuantity]),
    SUM(Production_Runs[ActualQuantity]),
    0
)

总体 OEE

// Overall Equipment Effectiveness
OEE =
[Availability] * [Performance] * [Quality Rate]

// OEE Status (for conditional formatting)
OEE Status =
SWITCH(TRUE(),
    [OEE] >= 0.85, "World Class",    -- 85%+
    [OEE] >= 0.75, "Good",           -- 75-85%
    [OEE] >= 0.60, "Acceptable",     -- 60-75%
    "Poor"                            -- <60%
)

// OEE Loss Analysis (what is the primary constraint)
Primary OEE Constraint =
SWITCH(TRUE(),
    [Availability] < [Performance] && [Availability] < [Quality Rate], "Availability",
    [Performance] < [Quality Rate], "Performance",
    "Quality"
)

// OEE trend (for sparkline visualization)
OEE Weekly Avg =
CALCULATE(
    [OEE],
    DATESINPERIOD(Date[Date], LASTDATE(Date[Date]), -7, DAY)
)

停机时间分析

停机时间 KPI 和帕累托

// Total Unplanned Downtime Hours
Unplanned Downtime Hours =
DIVIDE(
    CALCULATE(
        SUM(Downtime_Events[DurationMinutes]),
        Downtime_Events[DowntimeCategory] = "Unplanned"
    ),
    60,
    0
)

// Mean Time Between Failures (MTBF)
MTBF =
DIVIDE(
    [Actual Run Time],
    CALCULATE(COUNTROWS(Downtime_Events),
              Downtime_Events[DowntimeCategory] = "Unplanned"),
    0
)

// Mean Time to Repair (MTTR)
MTTR =
AVERAGEX(
    FILTER(Downtime_Events, Downtime_Events[DowntimeCategory] = "Unplanned"),
    Downtime_Events[RepairTimeMinutes]
)

// Downtime % by reason (for Pareto chart)
Downtime Pareto % =
DIVIDE([Unplanned Downtime Hours],
    CALCULATE([Unplanned Downtime Hours], ALL(Downtime_Events[DowntimeReasonCode])),
    0
)

// Cumulative Downtime % (for Pareto 80/20 line)
Cumulative Downtime % =
DIVIDE(
    SUMX(
        FILTER(
            ALL(Downtime_Events[DowntimeReasonCode]),
            RANKX(ALL(Downtime_Events[DowntimeReasonCode]),
                  [Unplanned Downtime Hours], , DESC) <=
            RANKX(ALL(Downtime_Events[DowntimeReasonCode]),
                  [Unplanned Downtime Hours], , DESC)
        ),
        [Unplanned Downtime Hours]
    ),
    CALCULATE([Unplanned Downtime Hours], ALL(Downtime_Events[DowntimeReasonCode])),
    0
)

停机热图

按机器 × 时间创建停机热图,以识别与轮班相关的模式:

// Downtime by Hour of Day (for heatmap rows)
Downtime by Hour =
CALCULATE(
    SUM(Downtime_Events[DurationMinutes]),
    Downtime_Events[HourOfDay] = SELECTEDVALUE(HourDim[Hour])
)

质量分析:SPC 图表

统计过程控制图监视过程是否受控。 Power BI 使用 DAX 中的控制限计算构建 SPC 图表。

X 条形图的控制限

// Process Mean (X-bar)
Process Mean =
AVERAGE(Quality_Events[MeasuredValue])

// Standard Deviation of measurements
Process StdDev =
STDEV.P(Quality_Events[MeasuredValue])

// Upper Control Limit (UCL = mean + 3σ)
UCL = [Process Mean] + 3 * [Process StdDev]

// Lower Control Limit (LCL = mean - 3σ)
LCL = [Process Mean] - 3 * [Process StdDev]

// Upper Warning Limit (mean + 2σ)
UWL = [Process Mean] + 2 * [Process StdDev]

// Lower Warning Limit (mean - 2σ)
LWL = [Process Mean] - 2 * [Process StdDev]

// Out of Control flag (point outside 3σ limits)
Out of Control =
IF(
    Quality_Events[MeasuredValue] > [UCL] ||
    Quality_Events[MeasuredValue] < [LCL],
    "Out of Control",
    "In Control"
)

// Process Capability Index (Cpk)
Cpk =
MIN(
    DIVIDE([UCL] - [Process Mean], 3 * [Process StdDev], 0),
    DIVIDE([Process Mean] - [LCL], 3 * [Process StdDev], 0)
)

关键质量 KPI

// Defects per Million Opportunities (DPMO)
DPMO =
DIVIDE(
    SUM(Quality_Events[DefectCount]),
    SUM(Quality_Events[SampleSize]) * [Opportunities per Unit],
    0
) * 1000000

// Sigma Level (from DPMO)
Sigma Level =
SWITCH(TRUE(),
    [DPMO] < 3.4, 6,
    [DPMO] < 233, 5,
    [DPMO] < 6210, 4,
    [DPMO] < 66807, 3,
    [DPMO] < 308537, 2,
    1
)

// Defect Rate %
Defect Rate = DIVIDE(SUM(Quality_Events[DefectCount]), SUM(Quality_Events[SampleSize]), 0)

// Scrap Rate
Scrap Rate =
DIVIDE(
    SUM(Production_Runs[ScrapQuantity]),
    SUM(Production_Runs[ActualQuantity]),
    0
)

// Cost of Poor Quality (COPQ)
COPQ =
SUMX(
    Production_Runs,
    (Production_Runs[ScrapQuantity] + Production_Runs[ReworkQuantity]) *
    RELATED(Dim_Product[StandardCost])
)

吞吐量分析

生产吞吐量 KPI

// Actual Throughput (units per hour)
Throughput =
DIVIDE(
    SUM(Production_Runs[ActualQuantity]),
    SUMX(Production_Runs,
        DATEDIFF(Production_Runs[StartTime], Production_Runs[EndTime], HOUR)
    ),
    0
)

// Theoretical Maximum Throughput
Max Throughput =
SUMX(
    Dim_Machine,
    60 / Dim_Machine[IdealCycleTime]  -- Units per minute × 60
) * 60  -- Per hour

// Capacity Utilization
Capacity Utilization =
DIVIDE([Throughput], [Max Throughput], 0)

// Schedule Attainment (actual vs planned quantity)
Schedule Attainment =
DIVIDE(
    SUM(Production_Runs[ActualQuantity]),
    SUM(Production_Runs[PlannedQuantity]),
    0
)

// Changeover Time (as % of planned time)
Changeover % =
DIVIDE(
    [Changeover Time],
    [Planned Production Time],
    0
)

生产线平衡分析

使用吞吐量比较来识别瓶颈机器:

// Machine Throughput Rate (for bottleneck identification)
Machine Throughput Rate =
DIVIDE(
    CALCULATE(SUM(Production_Runs[GoodQuantity])),
    CALCULATE(
        DATEDIFF(MIN(Production_Runs[StartTime]),
                 MAX(Production_Runs[EndTime]), HOUR)
    ),
    0
)

// Bottleneck indicator (lowest throughput machine in a line)
Is Bottleneck =
IF(
    [Machine Throughput Rate] = MINX(
        FILTER(ALL(Dim_Machine), Dim_Machine[Line] = SELECTEDVALUE(Dim_Machine[Line])),
        [Machine Throughput Rate]
    ),
    "Bottleneck",
    "OK"
)

制造仪表板架构

第 1 页:OEE 摘要

  • OEE 指标(当前与世界一流的 85% 目标)
  • 可用性、性能、质量 — 三张 KPI 卡
  • OEE趋势30天(折线图)
  • 按机器划分的 OEE(条形图,从低到高排序)
  • 按班次划分的 OEE(条形图 — 识别班次绩效差异)
  • OEE 热图(机器 × 星期几)

第 2 页:停机时间分析

  • 总计划外停机时间(KPI 卡)
  • MTBF和MTTR(两张KPI卡)
  • 停机帕累托(组合条+累积百分比线)
  • Downtime by machine (horizontal bar chart)
  • 按班次划分的停机时间(分组栏)
  • 90天停机时间趋势(折线图)
  • 活动停机事件(如果是流式传输,则为实时表)

第 3 页:质量仪表板

  • 首次通过率(仪表与目标)
  • DPMO 和 Sigma 级别(KPI 卡)
  • 按产品划分的废品率(条形图)
  • COPQ 趋势(显示质量问题成本的折线图)
  • 通过缺陷代码来缺陷 Pareto
  • SPC图表(带有UCL、LCL、UWL、LWL参考线的折线图)

第 4 页:吞吐量和容量

  • 进度完成百分比(标准)
  • 实际产量与计划产量(按天分组)
  • 机器的容量利用率(热图)
  • 转换时间分析(按产品/机器的条形图)
  • 产量趋势(面积图、实际与目标)
  • 瓶颈机亮点表

常见问题

什么是 OEE?为什么它对制造如此重要?

OEE(整体设备效率)是衡量制造生产力的黄金标准指标。它结合了三个因素:可用性(设备在应该运行的时候运行)、性能(以正确的速度运行)和质量(生产优质零件)。 60% 的 OEE 意味着您只实现了理论产能的 60%,另外 40% 是浪费。提高 OEE 可以直接增加产量,而无需对新设备进行资本投资。

Power BI 能否连接到 MES 系统以实现实时 OEE?

是的 - 大多数 MES 系统(Ignition SCADA、GE Proficy、Siemens MES、Rockwell FactoryTalk)都支持数据库连接(SQL Server、Oracle)或 REST API 访问。 Power BI 连接到这些数据库,并可以使用流数据集进行近实时更新(每 30 秒到 1 分钟)。要获得真正的实时 OEE(亚秒级),请使用 Azure IoT 中心或事件中心以及直接从工厂车间传感器推送的 Power BI 流数据集。

工厂需要哪些数据来开始跟踪 OEE?

基本 OEE 的最低数据要求:(1) 生产计数数据 — 机器何时运行以及生产了多少件,(2) 停机事件 — 机器何时停止以及原因,(3) 质量计数 — 好件与缺陷件的数量。这可以来自操作员手动输入(Excel/纸张 → Power BI)、基本 MES 或 PLC 计数器数据。开始时不需要完美的数据——即使不完美的 OEE 可见性也能推动改进。

如何在 Power BI 中构建 SPC 图表?

创建以测量值为主系列的折线图。添加四个附加度量(UCL、LCL、UWL、LWL)作为图表中单独的线系列。将 UCL/LCL 设置为红色虚线,将 UWL/LWL 设置为橙色虚线。数据点的条件格式以红色突出显示失控点。 AppSource 的内置 SPC 自定义视觉效果提供了超出基本控制限制方法的 Western Electric 规则检测(中心上方/下方运行、趋势等)。

实施 Power BI 制造仪表板的实际时间表是多少?

基本的 OEE 仪表板(单机、通过 SharePoint 列表或 Excel 手动数据输入)可以在 1-2 周内构建。连接到 MES 和 ERP(多机器、多生产线、质量 SPC、停机 Pareto 和吞吐量分析)的完整制造分析平台通常需要 6-12 周。最长的阶段始终是数据集成和数据质量——在分析增加价值之前,需要一致地捕获机器时间戳、停机原因代码和产品转换。

ECOSIRE 如何将 Power BI 连接到 Odoo Manufacturing?

Odoo Manufacturing 在 PostgreSQL 中存储生产工单、材料消耗、质量检查和维护请求。 ECOSIRE 将 Power BI 直接连接到 Odoo 的 PostgreSQL 数据库(在只读副本上),并将制造表(mrp.product、mrp.workcenter、quality.check、maintenance.request)建模到本指南中描述的 OEE 数据模型中。作为 Odoo ERP 集成实践的一部分,我们负责处理工作中心级产能规划和质量集成。


后续步骤

Power BI 中的制造分析(当连接到生产车间数据时)可提供实时可见性,将世界一流的制造商与普通制造商区分开来。 OEE、停机根本原因分析和质量 SPC 图表为运营团队提供了在问题复合之前进行改进的信息。

ECOSIRE 构建连接到 MES 系统、ERP 平台(Odoo、SAP、Dynamics 365)和 IoT 数据流的制造仪表板。我们的 Power BI 仪表板开发服务 涵盖从数据模型设计到生产就绪仪表板的完整制造分析堆栈。

联系我们的制造分析团队,讨论您的工厂车间数据源并设计一个 Power BI 分析平台,以推动可衡量的 OEE 改进。

E

作者

ECOSIRE Research and Development Team

在 ECOSIRE 构建企业级数字产品。分享关于 Odoo 集成、电商自动化和 AI 驱动商业解决方案的洞见。

通过 WhatsApp 聊天