Forum Discussion

Alwyn1991's avatar
Alwyn1991
Frequent Visitor
7 years ago
Solved

Calculating Percentage

Hi all, 

 

Apologies if this has already been answered but im looking to work out how to calculate the % of a column.

the scenario is
100 Audits Undertaken 60 of them Passed and 40 of them have failed

i want to show  a card Visual to show that 60% passed, the column only has the text "pass" or "fail"

 

Thanks

Al

  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi

    you can create a measure:

     

    Passed =
    DIVIDE (
        COUNTROWS(FILTER(Table1;Table1[Column1]="pass"));
        COUNTROWS(Table1)
    )

    Remember to format the measure as percentage :)
  • Alwyn1991 try this

     

    % Passed = 
    DIVIDE(
    CALCULATE( COUNTROWS( Table ), Table[Column] = "Passed" ),
    COUNTROWS( Table )
    )

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi

    you can create a measure:

     

    Passed =
    DIVIDE (
        COUNTROWS(FILTER(Table1;Table1[Column1]="pass"));
        COUNTROWS(Table1)
    )

    Remember to format the measure as percentage :)
  • Alwyn1991 try this

     

    % Passed = 
    DIVIDE(
    CALCULATE( COUNTROWS( Table ), Table[Column] = "Passed" ),
    COUNTROWS( Table )
    )