Forum Discussion

dw700d's avatar
dw700d
Icon for Post Patron rankPost Patron
7 years ago
Solved

Converting Yes & No Data to visuals

I have data that contains 45  different questions  and thousands of responses that include either "Yes", "No", "N/A". I would like to create a pie chart that shows the percentage of Yes Answers as a ...
  • v-lili6-msft's avatar
    7 years ago

    hi, dw700d

    You could try this way as below:

    In Edit Queries, select Student column,then right click->Upivot other columns

    or select all question columns ->Unpivot columns

    Close&Apply

    Then create a measure like this

    Measure = CALCULATE(COUNTA(Table1[Value]))/CALCULATE(COUNTA(Table1[Value]),ALLSELECTED(Table1))

    or

    Measure 2 = CALCULATE(COUNTA(Table1[Value]))/CALCULATE(COUNTA(Table1[Value]),ALLEXCEPT(Table1,Table1[Student]))

    Result:

     

    and here is pbix please try it.

     

    Best Regards,

    Lin