Forum Discussion
anshpalash
4 years agoHelper II
Division Calculation by Filters
Hi all,
I have a dataset similar to the form:
| Month | Defect Code | Defect Count |
| 1 | 212 | 10 |
| 1 | 600 | 20 |
| 1 | 665 | 10 |
| 2 | 999 | 15 |
| 2 | 900 | 15 |
| 2 | 137 | 10 |
I want to calculate defect% per month and defect code. For example, the defect% for month 1 and code 212 would be the number of defects for the code 212 in month 1 divided by the total number of defects in that month. So, defect% in this case would be 10/(10+20+10) = 0.25 or 25%.
I want to create a line graph that would show defect%. In this line graph, the axis would be months (1,2,..), the legend would be defect codes and the values would be defect%. Can anyone please help me on how I can achieve this? Thank you!
- Anonymous4 years agoCreate a column and paste this codeColumn = DIVIDE('Table'[Defect Count],CALCULATE(SUM('Table'[Defect Count]), ALLEXCEPT('Table','Table'[Month])),0)
2 Replies
- AnonymousNot applicableCreate a column and paste this codeColumn = DIVIDE('Table'[Defect Count],CALCULATE(SUM('Table'[Defect Count]), ALLEXCEPT('Table','Table'[Month])),0)
- anshpalashHelper II
Thank you!