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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Dynamic Hierarchy selection with slicer - data labels not displaying correctly

I am creating a dashboard where I would like the users to have the ability to select a level of a hierarchy to display the distribution of that hierarchy for a set of categories.  I made use of this blog post on how to set dynamic categories/legends, which works perfectly with the exception of the data labels.  (https://xxlbi.com/blog/dynamic-hierarchies-in-power-bi/)    For the 100% stacked bar chart, I would need the Legend to reflect the level the user selects in the slicer.   Here's what I am seeing, the top stacked chart is with the dynamic selection, the  bottom is without.  The distribution for both is correctly sliced, however the data label for the dynamic version is showing 0.0% instead of the expected % distribution.   I'm not sure why this doesn't display correctly in the dynamic legend scenario, any ideas on this?  When I hover over the top chart, the tool tip does show the correct % distribution.  

Power_BI_Distribution_Incorrect_labelling.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

That unfortunately didn't work - for whatever reason, when I went back and re-created the visualization from scratch, it seemed to work with the correct data values showing.  (I had at first just changed the chart from a regular bar to the stacked %)  I am not sure why that worked vs. changing the chart type, but it's fixed now.  

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

Try to change the decimals up or down and then set it to zero again. I hope that this helps!

vluwangmsft_0-1626424002893.jpeg

 

If possible, please share your .pbix file and remove confidential data.

 

Best Regards

Lucien

 

 

Anonymous
Not applicable

That unfortunately didn't work - for whatever reason, when I went back and re-created the visualization from scratch, it seemed to work with the correct data values showing.  (I had at first just changed the chart from a regular bar to the stacked %)  I am not sure why that worked vs. changing the chart type, but it's fixed now.  

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors