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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
lharper
New Member

Calculate Percentages on Bar Chart

Hello, 

I have some demographic data and I am creating bar charts. The dataset is one row per respondant. I'd like to display both the number of and percentage of respondants for each race category in the bar chart, like in the example below (generated in Tableau). I have seen solutions for creating stacked column and line charts as a workaround, but the percentages do not display well on the smallest categories. 

 

Any solutions for easily displaying displaying percentages? It does not necessarily need to be in the bar chart format, though that is preferable. 

 

lharper_0-1686767032939.png

 

1 ACCEPTED SOLUTION
ray_aramburo
Super User
Super User

Bar charts and column charts by default can't include percentages in the labels but a workaround that may work is the next one.

Create a measure like this:

Label= CONCATENATE(CONVERT([MeasureThatGetsTotals], STRING), " (" & CONVERT([MeasureThatGets%Total],STRING) & ")")
 
Then, turn on the Data Labels, in Values turn on Custom label and drag & drop the created Label measure there.
ray_aramburo_0-1686768080968.png

 





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





View solution in original post

1 REPLY 1
ray_aramburo
Super User
Super User

Bar charts and column charts by default can't include percentages in the labels but a workaround that may work is the next one.

Create a measure like this:

Label= CONCATENATE(CONVERT([MeasureThatGetsTotals], STRING), " (" & CONVERT([MeasureThatGets%Total],STRING) & ")")
 
Then, turn on the Data Labels, in Values turn on Custom label and drag & drop the created Label measure there.
ray_aramburo_0-1686768080968.png

 





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Kudoed Authors