Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

How to unpivot a multiple choice survey question and visualising % chosen

Hi,

 

I'm new to PowerBI and struggling to figure out how to format my data for a multiple choice survey question.

 

I have thirteen answers options that a respondent could choose up to 4. I would like to create a ranked bar chart of the options.

 

I have tried using PowerQuery to unpivot the columns into a single attribute and value, and when plotting this displays the correct count of the values.

 

However when I want to show the % chosen instead of count by selecting % of grand total, rather than looking at the total number of respondents (510), it is dividing it now by the total number of rows in the unpivoted data set, so the % chosen appears much lower.

 

How do I get the chart to look at the correct total for the %? My raw data is displayed like below:

Multi choice.PNG

 

Thanks! Sam

2 REPLIES 2
parry2k
Super User
Super User

@Anonymous unpivot surely the way to go, but for % you need to calculate distinct count of response id and then calculate the %



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @Anonymous ,

 

We can make it divide by the countrows of non blank value for the column value as below.

Measure = 
VAR cr =
    COUNTROWS ( 'Table' )
VAR crr =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        FILTER ( ALL ( 'Table' ), 'Table'[Attribute] <> BLANK () )
    )
RETURN
    DIVIDE ( cr, crr )

Capture.PNG

 

For more details, please check the pbix as attached.

 

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors