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