Forum Discussion

Vlademir's avatar
Vlademir
New Member
4 years ago
Solved

Percentage with multiple responses

Good Morning

I need to draw graphs resulting from questions with  multiple answers (check box). where each answer option corresponds to a column, so in a question I will have 10 columns. How to generate a graph with the 10 columns and that the label is the percentage of the number of respondents.
Sure to count on your promptness, I thank you in advance.
Vladimir Quadros


Below, Result through excel.

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Vlademir ,

     

    Based on the description, I created a sample table. Here I use 1 and 0 to distinguish if this answer is selected.

    Transform data.

    Right-click on the [index] column and click to Unpivot Other Columns -> Close and apply.

    Please create a new measure. 

    Measure = 
    VAR _total_1 = SUM('Table'[Value])
    VAR _total_2 = COUNTROWS('Table')
    RETURN
    DIVIDE(_total_1,_total_2)

    Changing the format of the measure.

    Create a new stacked bar chart and drag in the fields.

    Turn on Data Labels.

    Result.

    The PBIX file is attached for your reference.

     

    Best Regards,
    Community Support Team_Gao

     

    If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly -- How to provide sample data

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Vlademir ,

     

    Based on the description, I created a sample table. Here I use 1 and 0 to distinguish if this answer is selected.

    Transform data.

    Right-click on the [index] column and click to Unpivot Other Columns -> Close and apply.

    Please create a new measure. 

    Measure = 
    VAR _total_1 = SUM('Table'[Value])
    VAR _total_2 = COUNTROWS('Table')
    RETURN
    DIVIDE(_total_1,_total_2)

    Changing the format of the measure.

    Create a new stacked bar chart and drag in the fields.

    Turn on Data Labels.

    Result.

    The PBIX file is attached for your reference.

     

    Best Regards,
    Community Support Team_Gao

     

    If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly -- How to provide sample data