Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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...
  • Anonymous's avatar
    Anonymous
    4 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.