Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
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:
Thanks! Sam
@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 )
For more details, please check the pbix as attached.