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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
m_richardson
Frequent Visitor

Clustered Column Chart: Display Percentage of Legend

The chart below displays the count of survey responses for each response type (e.g. Agree, etc) by year.

 

m_richardson_0-1675721702186.png

m_richardson_1-1675721776944.png

 

Because there are a different number of respondees per year I'd like to convert this to percentages, so that each bar is a proportion of the overall year and therefore more easily compared. If I select 'Show value as' I only get the option to display as a Percent of the grand total, so I know I need to create a measure here for this to work properly.

 

Please note I also have a filter on the chart for a column called 'Question' that pinpoints the specific question asked.

 

What should the measure look like so that each the reponses total to 100% for the year, and so that I can more directly compare the bars as percentages rather than values?

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @m_richardson 

 

You can try the following methods.
Sample data:

vzhangti_0-1675748309627.png

Measure = 
Var _N1=CALCULATE(COUNT('Table'[Question]),ALLEXCEPT('Table','Table'[Response],'Table'[Year]))
Var _N2=CALCULATE(COUNT('Table'[Question]),ALLEXCEPT('Table','Table'[Year]))
Return
DIVIDE(_N1,_N2)

Result:

vzhangti_1-1675748349454.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @m_richardson 

 

You can try the following methods.
Sample data:

vzhangti_0-1675748309627.png

Measure = 
Var _N1=CALCULATE(COUNT('Table'[Question]),ALLEXCEPT('Table','Table'[Response],'Table'[Year]))
Var _N2=CALCULATE(COUNT('Table'[Question]),ALLEXCEPT('Table','Table'[Year]))
Return
DIVIDE(_N1,_N2)

Result:

vzhangti_1-1675748349454.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.