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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Limit Number of Categories Selected From Hierarchy Slicer

I have a hierarchy slicer that has 3 levels. The first has two categories, the second has two categories, and the third has up to a hundred categories depending on which combination of the first two levels are selected. My issue lies in my two main visualizations dependent on the slicer: a stacked column chart and line chart. The legend is dependent on the third level of the hierarchy since I would like the user to be able to compare values based on the most specific category. However, if the user selects more than 10 categories or the entirety of say one of the second level hierarchy options, there ends up being hundreds of lines on my line chart and hundreds of levels to my bar chart. Is there a way for me to have Power BI average values when the user selects >=10 categories without making the legend completely dependent on my second hierarchy level? 

3 REPLIES 3
Anonymous
Not applicable

These visuals don't look too attractive, do they... But the reason for making the legend dependent on the third hierarchy level is that it makes it extremely easy for the user to compare two or three specific levels but only if they select a small number of categories.

line.PNGbar.PNG

Hi @Anonymous ,

 

You may create column or measure to get the average, then choose the visual Line and stacked column chart to display the result, putting the new created column or measure onto Line values box.

 

Best Regards,

Amy

 

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

Anonymous
Not applicable

Hi @v-xicai , I can get the average by making the legend in my visuals dependent on the second hierarchy level. However, I wanted a way to limit the number of categories that the user is able to select so the plot does not get too crowded when selecting from the third hierarchy level which contains a lot of categories. I figured that I'm just going to create two separate pages of my report -- one that allows the user to choose from the third hierarchy level (hopefully they will realize that the plot will get messy if they select > 10 categories) and one that allows the user to only choose from the first or second hierarchy so it just includes totals and averages.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.