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
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

19 REPLIES 19
ExcelMonke
Resolver I
Resolver I

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

 

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],"%")

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

 

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

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.

Anonymous
Not applicable

Hi @Richtpt  did you find answer to your question? If yes - Please let me know. I have the same issue.

Sorry, no, never found a solution for this.  I did submit a feature request, though don't know if they ever did it.

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.

Top Solution Authors