# Analyze Quality

Once checks are coming in, two questions matter. Are the checks being done? And what do the results say? **Check Summary**
answers the first. **Check Details** answers the second, with charts, SPC rules and capability. This lesson shows you how to
use both, and what to decide from them.

:::note
Reports and SPC use only **Approved** checks. A check that is still Submitted or rejected isn't counted. See
[Approve and Reject](./7-approve-and-reject.md).
:::

## Are the Checks Being Done? Check Summary

**Check Summary** counts checks by status. It answers questions such as "How many checks are we missing, by check sheet, by
shift, by area?" and "Are we placing an unnecessary burden on operators?"

1. Open **Quality → Analysis → Check Summary**.
2. Filter by asset, by item, and by a date range. Choose whether to include manual or auto checks.
3. Choose a report mode: by check sheet, area, shift, asset or item.
4. Read the bar graph. Click **Show Table** for the numbers, or **Show Shift Heat Map** to see whether problems cluster on a
   shift.
5. Click **Export Check Sheet Data** to save the report as a CSV file.

![Check Summary](https://docs.kanoa.ai/img/quality/quality-analysis-check-summary.png)

{/*
TODO: Confirm on a gateway that the report loads data on its own when opened.
*/}

| If you see mostly | It usually means |
| --- | --- |
| Approved | Checks are being done on time. |
| Due | Work is waiting to be done. |
| Over Due | Checks are being done late. |
| Missed | A compliance problem. |
| Cancelled or Rejected | The process or the check sheet needs review. |

For example, a lot of **Missed** on one shift can mean the timers are too tight, or that checks are too frequent. Compare
against your trigger timers from [Schedule a Check Sheet](./3-schedule-a-check-sheet.md).

::embed-section{src="../../kanoa-quality/checkSummary.md" collapsed="true" summary="Reference Materials: Check Summary - Filters, report modes and visualizations."}

## What Do the Results Say? Check Details

**Check Details** shows the values of check items across many checks. The Quality Inspector lesson [Read SPC](../6-quality-inspector/4-read-spc.md)
covers the basics of opening it and reading a trend chart. This lesson adds what a manager decides from it.

1. Open **Quality → Analysis → Check Details**.
2. Select a check sheet. Filter by asset or item, and choose a date range.
3. Turn on **Statistics**, **Show Production Info** and **Show Item Spec** as needed.
4. Select a check item and click the trend icon for the **Trend View**, or the control chart icon for an SPC **Control Chart**.

![Check Details](https://docs.kanoa.ai/img/quality/checkDetails.png)

Use **Statistics** to see min, max, average, standard deviation and calculated control limits. Use **Show Item Spec** to
compare against the spec limits.

## Apply SPC Rules

In the Trend View, choose **Nelson**, **WECO** (Western Electric) or **Custom** from the rules dropdown. Violations are
highlighted. A rule can fire while every value is still in spec. That is the point: it warns you of drift before a part
fails.

When a rule fires, find out what changed. **Show Production Info** adds the item, asset and shift for those points.

![Trend View](https://docs.kanoa.ai/img/quality/spcChart.png)

::embed-section{src="../../kanoa-quality/checkDetails.md#applying-spc-rules" collapsed="true" summary="Reference Materials: Applying SPC Rules - Rule sets and chart types in the Trend View."}

## Pick a Chart Type

In the **Control Chart**, pick the chart type that matches how the check was recorded. Choose **Individual Readings
(I-MR)** for one value at a time. Choose **Subgroup Average & Range (X-bar/R)** for subgroups of 2 to 10 readings. Other
types cover pass or fail counts and defect counts. You can also choose a rule set here, and enter spec limits.

![Control chart](https://docs.kanoa.ai/img/quality/univariate.png)

For related check items, such as several dimensions on one part, the **Control Chart (Multivariate T2)** charts them together.

## Read Capability

If you enter spec limits for an individuals or X-bar chart, a **Capability** tab appears. It shows Cp, Cpk, Pp and Ppk.

- **Cp** compares the process spread with the tolerance, assuming it is perfectly centered.
- **Cpk** adjusts that for how far off-center the process is. It is never higher than Cp.
- **Pp** and **Ppk** use the total long-term variation, including drift and shift changes.

Being **in control** and being **capable** are different questions. A stable chart can still make scrap if the process is wider
than the tolerance.

| Cpk | Rule of thumb |
| --- | --- |
| Below 1.0 | Not capable. Out-of-spec parts even while in control. |
| 1.33 | A common minimum acceptance level. |
| 1.67 or more | Often required for safety-critical or automotive parts. |

Use the numbers to decide what to do:

- **Cpk well below target, no rule violations:** the process itself isn't capable. It needs a process, equipment or tooling
  change.
- **Cpk much higher than Ppk:** the process is capable moment to moment, but drift, changeovers or material changes widen
  the total spread. Look for the cause.
- **Capability only matters on a stable process.** Fix rule violations first.

Capability assumes roughly normal data. It isn't shown for pass or fail count charts or Pre-Control.

::embed-section{src="../../kanoa-quality/checkDetails.md#process-capability-cpcpkppppk" collapsed="true" summary="Reference Materials: Process Capability - Cp, Cpk, Pp and Ppk and how to interpret them."}

## Check Your Understanding

1. Which screen tells you how many checks were missed on each shift?
2. A chart shows no rule violations, but Cpk is 0.8. What does that tell you?
3. Cpk is much higher than Ppk. What does that suggest?

<details>
<summary>Answers</summary>

1. **Check Summary**, with the shift report mode or the shift heat map.
2. The process is stable but not capable. Its natural spread is wider than the tolerance, so it makes out-of-spec parts.
3. The process is capable moment to moment, but something over time, such as drift or changeovers, widens the total spread.

</details>
