Forum Discussion

Budfudder's avatar
Budfudder
Helper IV
8 years ago
Solved

Calculating Percentage

I have a table with 15K rows, each of which is a potential order. Each row has a status of Open, Lost or Won. I've created three extra columns, one for each of those status, and populated them with: ...
  • ChrisMendoza's avatar
    8 years ago

    Budfudder,

     

    Would this work for you?:

    measure = 
    
    VAR countLost = CALCULATE(COUNTROWS(Table2),Table2[Status]="Lost")
    VAR countWon = CALCULATE(COUNTROWS(Table2),Table2[Status]="Won")
    
    VAR denominator = countWon + countLost
    
    RETURN DIVIDE(countWon, denominator, 0)