Forum Discussion
Anonymous
4 years agoNot applicable
Dividing two calculated columns
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 A...
- Anonymous4 years ago
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.
Anonymous
4 years agoNot applicable
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.
- Anonymous4 years agoNot applicable
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! 🙂