Forum Discussion

BradleyN1's avatar
BradleyN1
Frequent Visitor
2 years ago
Solved

Counting values based on unique ID then dividing

Hi, I am working on survey data, and I want an overall satisfaction percentage. As I've had to unpivot the columns, I've got duplicate statements in 1 column, but I only want to count the numbe...
  • Dangar332's avatar
    Dangar332
    2 years ago

    Hi, BradleyN1 

     

    try below 

    just adjust your table and column name

    Measure = 
    var a = CALCULATE(COUNT('count'[Response]),or('count'[Response]="agree" ,'count'[Response]="strongly agree"))
    var b = COUNT('count'[Response])
    return 
    DIVIDE(a,b)