Forum Discussion

ChristianAU's avatar
ChristianAU
Frequent Visitor
2 years ago
Solved

Response rate measure

I have a column with 1's and 0's which is based on a yes/no system, where 1's = yes and the 0's = no.

How do i make a measure that gives me a response rate with this dataset? The percentage of the dataset with 1's compared to 0's.

3 Replies

  • _AAndrade's avatar
    _AAndrade
    Icon for Resident Rockstar rankResident Rockstar

    Hi ChristianAU,

    Here is my solution:

    I'm using this table:



    I have 3 "YES" at a total of 8 answers, so 37.5% of YES answers.

    I used this DAX measure to compute this number:

    % YES = 
    VAR _CountYes = 
        CALCULATE(
            COUNT(T_Responses[Answer]),
            T_Responses[Answer] = 1
        )
    VAR _TotalAnswers = COUNTROWS(T_Responses)
    
    VAR _Result = DIVIDE(_CountYes, _TotalAnswers)
    
    RETURN
        _Result


    Final result: