How to Calculate the Gross Defect Rate

Hi Team,

Could someone please assist me with the following scenario.

We have received a total of 700 orders, and conducted random testing on 171 of them. Within these tested orders, we found defects in 38. Since an order can have multiple defects, we used the maxover () function to assign ratings of 1, 2, or 3. To calculate the gross defect rate, we applied the following rule, the results are as shown in the screenshot.

GDR = distinct_countIf(ordernumber,status=“No” AND rating=2 OR rating=3)

So far, the results are accurate. We now need to calculate the defect rate percentage for each category based on the number of orders audited, which is 171. For example, there are 2 defects in category A, so the defect rate would be 2/171 , resulting in approximately 1.17%. This was calculated using the formula: GDR (Gross Defect Rate) divided by the number of orders audited. However, I am not obtaining the correct results. The total defect percentage appears to be correct. However, I am unsure where I might have made a mistake. Can someone assist me?

Thanks!

1 Like

Hello @tdr_Dinesh, just to confirm, is it the number of defects in a single category divided by the number of audits for that category or across all categories? I think you will likely want to switch the calculations to LAC-W aggregations to accomplish this. I’ll write the examples below:
GDR = distinctCountOver(ifelse(status=“No” AND (rating=2 OR rating=3), ordernumber, NULL), [{category}], PRE_AGG)

I am not certain how you are calculating the 171 currently, so update this next example with the proper fields:
Orders Audited = sumOver({Audited}, [], PRE_AGG)

If you want the orders audited by category, you can add the category field in the partition. Now that these 2 fields are utilizing the same aggregation type, you can divide them to get the percent.

Let me know if this helps!

Hi @DylanM,

Thanks for your assistance.

1 Like

Hello @tdr_Dinesh, I am glad my proposed solution worked. Thank you for following up!