Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Card with Percentage

I have a survey response which has the following columns:

 

Start date [shows the date the survey was submitted]

How did we do? [is a drop down list of 5 options; Excellent, Good, Okay, Unsatisfactory, Poor]

 

I want to create a card which shows the total percentages of positive responses [Excellent and Good].

 

Any help would be most appreciated.

1 Reply

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft Employee

    Hi Anonymous,

     

    If you have the column of the list, you can add it in a slicer with drop-down type. If there isn't such a column, you can add a calculated column with the below formula.

     

    Column =
    IF (
        [score] >= 90,
        "Excellent",
        IF (
            [score] >= 80,
            "Good",
            IF ( [score] >= 70, "Okay", IF ( [score] >= 60, "Unsatistactory", "Poor" ) )
        )
    )
    

    The percentage should be a measure.

     

     

    Measure =
    DIVIDE (
        CALCULATE (
            COUNTROWS ( 'table' ),
            FILTER ( ALL ( 'table' ), 'table'[Column] IN { "Excellent", "Good" } )
        ),
        CALCULATE ( COUNTROWS ( 'table' ), ALL ( 'table' ) ),
        0
    )
    

    If you'd like more precise formulas, please provide a dummy sample that we can download.

     

     

     

    Best Regards,
    Dale