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
LGi
Regular Visitor

Stacked bar chart with label style - Category name

Hi Guys, 

I would like to display the "Category Name" inside the visual Stacked Bar Chart (and not as a legend list on the side).
The defult option sadly allows to display inside the column chart only the percentage, how can I change it to Category name (like it is possible to do in a pie chart).
Is it possible with Power BI? 

Cheers,
Lior

Screenshot 2021-04-28 at 10.09.54.png

12 REPLIES 12
V-lianl-msft
Community Support
Community Support

Hi @LGi ,

 

In the stacked bar chart, we cannot set the information to display in your label property. So I am afraid there is no such a function to achieve this requirement. If you are a experienced coder, you could create a custom visual to display similar information in your chart.
https://powerbi.microsoft.com/en-us/documentation/powerbi-custom-visuals-getting-started-with-develo...

 

If you have any concern on this feature, you can submit your idea on the link below. If this feature was mentioned by mulitple users, product team will consider to add this feature to next release.

https://ideas.powerbi.com/forums/265200-power-bi-ideas

 

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

 

Hi Liang, 

thank you for your comments. unfortunately I'm not an experienced coder 😞

I have submitted an idea as recommended.
https://ideas.powerbi.com/ideas/idea/?ideaid=3ccaf324-faa7-eb11-89ee-0003ff455f8a  

amitchandak
Super User
Super User

Hi @amitchandak,
Thank you for the quick response, unfortunatly the link helps so show only the %, what I am looking for is to show the category name label inside the visual, not %. Do you know if this is possible?

@LGi , for y-axis and x-axis , label as of now there is no option to move in the visual

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

oh that's a shame 😞 hopefully a solution would be availble soon. Thanks for your support. 

@LGi , can you share some diagram of what you are looking for

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

What I need to create has % in axis, name of country (dimention) + value as label inside the chart 

Screenshot 2021-04-28 at 10.09.54.png

Giu
Frequent Visitor

Hi Guys, 

I would like to do the same. 
Any news on this?
Thanks

@Giu I have found a way to do this, you need to create a measure which combines the label and the value:

Category Label = SELECTEDVALUE('TableName'[Country]) & [ValueMeasure]

Then under Data Labels drop down in the Visual section of the Format Visual Pane, go to Values and change Custom Label to 'On' then drag your Category Label measure into it. Bobs your uncle!

 

Thanks @JemmaD ! This worked for me too.

 

Another note in case it helps others. I wanted multiple spaces between my Series Name and Measure Value, but just adding multiple spaces into the label measure didn't work. Power BI still showed only one space between the name and the value:

 

Category Label = SELECTEDVALUE('TableName'[Country]) & "   " & [ValueMeasure]

 

Instead, I had to use the non-breaking space character UNICHAR(160) multiple times, and that worked to give me sufficient space between the name and the value:

 

Category Label = SELECTEDVALUE('TableName'[Country]) & UNICHAR(160) & UNICHAR(160) & UNICHAR(160) & [ValueMeasure]

 

Here's how my final result looks, you can see it works with a 'Line and clustered column chart' too:

peggysue_0-1736275735056.png

 

Hi!

From my point of view is the best solution take a look of the results:

Luis_Caston_0-1708425743114.png

 

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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