I have a simple situation but I can't seem to figure out.
Here is a simplified version of data I have: 10 parts and associated number of defects.
I need to count how many parts with at least one defect (3) and a count of how many parts WITHOUT defect (7).
Ultimately I need to find the percentage, that is, 3/10 = 30%
Thanks!
PartID | Defect |
---|---|
A | 0 |
B | 0 |
C | 1 |
D | 2 |
E | 1 |
F | 0 |
G | 0 |
H | 0 |
I | 0 |
J | 0 |
PART | DEFECT |
A | 0 |
B | 0 |
C | 0 |
D | 0 |
E | 1 |
F | 2 |
G | 0 |
H | 4 |
I | 0 |
J | 0 |
Hi Thai,
I think there's a couple ways you could go about this but I think the easiest is SUM(IF [Defect] = 0 THEN 1 ELSE 0 END)/SUM([Number of Records]. This will give you the % of parts without a defect.
Good luck,
Ivan
Become a Viz Whiz on the Forums!
Support the Community and master Tableau.