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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
mterry
Helper V
Helper V

Trouble creating a new measure showing percent of totals

I have a table with two columns, one column has various questions, the other has responses that fall into 3 categories: positive, negative and neutral. I have a clustered column chart with the 'Questions' being the value for the Axis, the 'Categorized Responses' being the Legend, and then the Count of Categorized Responses being a value. This gives me a visual where I can compare the number of positive, negative and neutral responses were received for each question. I'm struggling to create a measure showing the percentage of positive, negative and neutral responses broken out by question. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

What you essentially need is a measure that counts number of Positive responses, Neutral, and Negative.  Then a separate measure that counts all rows.  Lastly you'd have a measure that gets your percentage.  When you wish to display this information, you can use the 3 percent measures and the context of the question should contrain the results
These measures need to be done using ALLEXCEPT such that is can take the context of which question it is considering.  So i'd be expecting something like:

AllCount = CALCULATE(
	countrows('YourTable'),
	ALLEXCEPT('YourTable', 'YourTable'[Question])
)

PositiveCount = CALCULATE(
	countrows('YourTable'),
	ALLEXCEPT('YourTable', 'YourTable'[Question]),
	'YourTable'[Answer] = "Positive"
)

PositivePercent = DIVIDE(
	[PositiveCount],
	[AllCount]
)

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

What you essentially need is a measure that counts number of Positive responses, Neutral, and Negative.  Then a separate measure that counts all rows.  Lastly you'd have a measure that gets your percentage.  When you wish to display this information, you can use the 3 percent measures and the context of the question should contrain the results
These measures need to be done using ALLEXCEPT such that is can take the context of which question it is considering.  So i'd be expecting something like:

AllCount = CALCULATE(
	countrows('YourTable'),
	ALLEXCEPT('YourTable', 'YourTable'[Question])
)

PositiveCount = CALCULATE(
	countrows('YourTable'),
	ALLEXCEPT('YourTable', 'YourTable'[Question]),
	'YourTable'[Answer] = "Positive"
)

PositivePercent = DIVIDE(
	[PositiveCount],
	[AllCount]
)

 

Worked like a charm, thanks for your help again!

Okay I'll try that, thanks for the help. 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.