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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
pianos101
Frequent Visitor

Hierarchy Label Formatting in Bar Chart

Just getting started with Power BI. I have a stacked bar chart which shows the count of each WidgetPartNumber in a query. On the y-axis label I want to show the columns WidgetPartNumber and WidgetPartName. I can kind of make it work by adding PartNumber and Name to the axis data, and show all levels of data in the bar chart.

 

However, when it displays both columns of data (PartNumber and Name), it just concatenates them together and it looks really messy. Additionally, it doesn't show the column names (WidgetPartNumber and WidgetPartName). I've tried making the PartNumber/Name into a hierarchy, but it displays the same.

 

In Tableau, doing the same thing will make a neatly-formatted y-axis label with column names.

 

Any idea how to do this in Power BI?

 

Power BI: 

PowerBI.png

 

 

Tableau:

Tableau.png

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @pianos101,

 

Based on my test, we can create a new table visual for your reference and hide the Y-axis of the stacked bar chart. Then we can get the result as the picture below. Please sort the two visuals by the same column.

 

hihi.png

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

That's a good idea. But as you can see it looks pretty ugly. I even tried to change the row padding on the table and the bar chart to get the lines to match up, and I just don't have that much time to fiddle with it.

 

At that, my data table has many more PartNumbers then I am displaying on the chart (using a Visual Level Filter on Count of PartNumber > 2), and I can't easily recreate that filter on the table. Probably can with code, but that's a bigger project.

 

As I said, Tableau can make this look pretty in a jiffy. There's really no way to do it here?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors