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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors