Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello everyone,
Recently I started to work with powerBI, and my calculations are not working properly. This is my data;
| KeyID | Process | Status |
| A1 | A | Error |
| A2 | A | Error |
| A3 | A | |
A4 | A | Success |
B1 | B | Error |
B2 | B | Success |
What I want to do is I want to create this table
| Process | Number of Error | Number of Error&Success | Number of Error/Number of Error&Success |
| A | 2 | 3 | 66,6% |
| B | 1 | 2 | 50,0% |
What I did is;
Number of Error: IF(table[Status]="Error", 1,0)
Number of Error&Status: (IF(table[Status]="Error" || table[Status]="Success", 1,0))
Number of Error/Number of Error&Status: (table[Number of Error])/sum(table[Number of Error&Status])
First two calculations are working properly. But third one, where I calculate the percentage, is not calculating correctly. How could I do this calculation?
Thank you so much
Solved! Go to Solution.
Hi @Anonymous ,
Please try:
Column = CALCULATE( SUM([Error])/ SUM([Error & Success]), ALLEXCEPT('Table','Table'[Process]))
Or you could create measures instead:
Number of Error = COUNTROWS(FILTER('Table',[Status]="Error"))Number of Error&Success = COUNTROWS(FILTER('Table',[Status] in {"Error","Success"}))% = DIVIDE( [Number of Error],[Number of Error&Success])
Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please try:
Column = CALCULATE( SUM([Error])/ SUM([Error & Success]), ALLEXCEPT('Table','Table'[Process]))
Or you could create measures instead:
Number of Error = COUNTROWS(FILTER('Table',[Status]="Error"))Number of Error&Success = COUNTROWS(FILTER('Table',[Status] in {"Error","Success"}))% = DIVIDE( [Number of Error],[Number of Error&Success])
Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Eyelyn,
First one somehow didn't work(Which I actually wanted to use column, instead of measure, cause I want to create group from column, which is not possible with measure). But the second one is working, thank you! 🙂
@Anonymous Shouldn't that last one be:
Number of Error/Number of Error&Status: sum(table[Number of Error]) / sum(table[Number of Error&Status])
Hi Greg thank you for your reply but it is not working either..
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 93 | |
| 70 | |
| 50 | |
| 40 | |
| 39 |