Forum Discussion

carbadine's avatar
carbadine
New Member
8 years ago
Solved

Calculate percentage based on values

Hi   New to Power BI today so apologies if this is very basic.   I am trying to calculate the percentage of grades in Maths column that are 5 or above.   I have added a new measure for this but...
  • Eric_Zhang's avatar
    8 years ago

    You can create a calculated column

    grade = IF(yourTable[value]>=5,"5 or above","less than 5")

     

    And then create a measure

    perc above 5 = COUNTROWS(FILTER(yourTable,yourTable[value]>=5))/COUNTROWS(ALL(yourTable))

     

    See more details in the attached pbix file. If you'd like more specific suggestion on your scenario, please post some sample data and expected output.