Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
10 years ago

How to Calculate Percentage of Rows With Specific Value in Column?

I have a set of data that has thousands of rows. There is a column that lists a rating of "At/Above Average". How would I create a measure that calculates how many rows have the value of "At/Above Average" in columnA and divides that by the total number of rows?

2 Replies

  • Sean's avatar
    Sean
    Icon for Community Champion rankCommunity Champion

    Anonymous

     

    At or Above Average = COUNTROWS ( FILTER(table, table[Column]="At/Above Average") )

     

    Total Rows = CALCULATE ( COUNTROWS (table), ALL(table) )

     

    % At or Above Average = DIVIDE ( [At or Above Average], [Total Rows], 0 )

     

    • duncfair's avatar
      duncfair
      Icon for Helper IV rankHelper IV

      I followed these instructions exactly and am not getting correct results