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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Richtpt
Frequent Visitor

How can I display values in Power BI 100% Stacked Bar?

I've got a 100% stacked bar chart that displays the percent of 100% for each stacked bar.

100pctStackedBar.png

I can hover over each bar to show the value for that bar (for example 69.10% is 966 and 30.90% is 432). Is there a way to display the value along with or instead of the percent? So it would be something like "966 (69.10%)" and "432 (30.90%)", or just the value would be fine.

 

In case it matters, data is coming from a SQL Server view.

 

Thanks!

1 ACCEPTED SOLUTION

Hi @Richtpt ,

 

The data labels option only shows the percentage and I didn't find any options to show both numbers and percentage.

I'd like to suggest you to submit an idea.

 

Best Regards,

Jay

Community Support Team _ Jay Wang

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

 

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

22 REPLIES 22
EaglesTony
Continued Contributor
Continued Contributor

I know this post is old, but for others to do this use a Stacked Bar Chart.

ExcelMonke
Super User
Super User

I think for this you may need to add each year as its own measure





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





sailochanar
Helper II
Helper II

I want to create a stacked horizontal bar chart with different colors for each bar of same column data based on the year .

image.png

in y axis - as per year value i want to change the bar colors for each year different color like this 

image (1).png

In100% stacked horizontal bar , for color bar unable to add measure ,there's no functionality to add measure .
image (3).png
Suggest any alternative graph or any solution.
 

 Thanks in advance

ExcelMonke
Super User
Super User

I think I found the solution to this:

Under the "Format Visual" button, turn on data labels. Under data labels, go to values, and add a custom label (turn it on). For the field select your measure. This worked for me.

So, for my own use case I came up with the following measure:

Value and Percent =
CONCATENATE(COUNT(Table1[ID])," ("&FORMAT('New Measures'[% of Total],"0.0%")&")")

ExcelMonke_0-1699476165090.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





can you please elaborate 'New Measures'[% of Total] from? thank you

Sure thing! It is a standalone measure that i have that calculates the % of my metric. Effectively:

'New Measures'[% of Total] =
FORMAT([MeasureA]/[MeasureB],"%")





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





I do not have an option to add custom labels to the stacked bar or 100% stacked bar visual. I do not see it as a preview feature either. 

salamander_0-1699476412892.png

 

It should be right under the overflow text option 🙂 

ExcelMonke_0-1699476697594.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Anonymous
Not applicable

how come such simple features to be added require such complex work-arounds? power bi lets users down so much...

salamander
Regular Visitor

How is this not a feature yet??? Tableau has been allowing multiple values as display text for years. Come on. 

Anonymous
Not applicable

Hi Richtpt

I know this is late, but I do this by doing the following: 

1) Create a calculated field that adds up all of the fields you are including in your chart.  Something like this:  
X_Axis_Total = [FIELD 1] + [FIELD 2] + .... [FIELD N]

2) Make a regular Stacked Bar Chart and put all your fields in the Values section.  

3) Turn on your data labels.

4) Temporarily turn on your X-Axis and modify the Start and End to be Start = 0 and for End click fthen select your new measure X_Axis_Total from the list.  

This should make your X-Axis go all the way across as if it was a 100% stacked chart, but it will use the actual values for the display and the chart colors.
Hope this helps!



  

VasTg
Memorable Member
Memorable Member

@Richtpt 

 

I think its possible. 

 

1. Create a visual in a seperate page and set the page as tooltip instead of the default one for your graph

2. Create a measure which concatenates the value and percent to total and use the measure in that visual created in step 1.

 

Let us know how it works.

 

If this helps, mark it as a solution

Kudos are nice too

Connect on LinkedIn
Richtpt
Frequent Visitor

I'm not sure I'm understanding what you are saying.

 

I created a new page and turned on the page tooltip.  Not sure what that accomplishes.

 

My 100% stacked bar chart is setup with FolderName in the Axis, Last Run Group in the Legend (which is Has Run Date and No Run Date), then TotalRecords in the value.  I created a measure that concatenates the values together but I can't use that measure in the Value.

 

When I turn on data labels it will display the percent.  I want to display either the percent and value or just the value.  Thanks!

VasTg
Memorable Member
Memorable Member

@Richtpt 

 

Go through the documentation on how to use a page as tooltip to another visual and try what I recomended.

 

https://docs.microsoft.com/en-us/power-bi/desktop-tooltips

 

 

Connect on LinkedIn
Richtpt
Frequent Visitor

AH, I see what you are saying.  That's cool, but not quite what I want.  I don't want to have to hover over a bar to view the amount, that's already there.  I want to just look at the chart and see the values and/or percent, not just the percent.  Something like the first bar.

100pctStackedBar2.png

Hi @Richtpt ,

 

The data labels option only shows the percentage and I didn't find any options to show both numbers and percentage.

I'd like to suggest you to submit an idea.

 

Best Regards,

Jay

Community Support Team _ Jay Wang

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

 

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

@v-jayw-msft Three years later "submit an idea". What a crap.

Hi there, 

Would you be able to advice if there is any update with regards to this request? Has a real solution being found/developed? Many thanks.

 

Best regards,

Awie

Refer

https://community.powerbi.com/t5/Desktop/100-Stacked-bar-chart-display/m-p/853213

https://community.powerbi.com/t5/Desktop/100-Stacked-bar-chart/m-p/905132

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Neither of these address the question I asked.  A 100% stacked bar chart shows the percent values for each bar when you turn data labels on.  I want to display either the percent and value or just the value.

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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