Forum Discussion

thampton's avatar
thampton
Icon for Helper III rankHelper III
7 years ago

need help with a measure

I have a table like below. I have an IF measure for if the person is above both thresholds (for the example lets say each threshold is 0) , assign a value of 1. I then want to take this total and divide by the total number of people. How can i achieve this? 

 

Name               Threshold 1                 Threshold 2                  Acheive Both (IF Measure)

Tom                         -1                                 2                                             0

Jane                         -2                                 -1                                            0 

John                         1                                  5                                             1

 

Since only John was above both, i would like to take 1/3(total people) to get 33%. 

1 Reply

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

    Hi thampton 

    If 'Acheive Both' is a calculated column in your table, you can create a measure like this and place it in a card visual:

     

    Measure =
    DIVIDE (
        CALCULATE ( COUNTROWS ( Table1 ), Table1[Acheive Both] = 1 ),
        COUNTROWS ( Table1 )
    )