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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Lanceometer
Frequent Visitor

Stacked Bar chart: Group legend values

Hi folks,

 

I have a stacked bar chart with products as a legend.

There are a lot of products in my data. Therefore does not show all and gives this hint

Lanceometer_0-1734609056705.png

 

 

Personally i think this is crazy because the user will not even read this and see a wrong revenue:

Lanceometer_1-1734609128657.png

 

 

But ok, it is what it is.

 

 

I tried to create a RANKX measure an show only the biggest legend values and group everything else as "Other"

But Power BI will not let me put a measure in the legend...

 

Any ideas?

  

1 ACCEPTED SOLUTION
mark_endicott
Super User
Super User

@Lanceometer - The stacked bar is absolutely the wrong choice of visual for this number of products. Besides the fact it's not showing all of them, there's absolutely no way your users will be able to establish what any of this means. 

 

There's also not really any way you SHOULD fix this with DAX. 

 

Perhaps this needs to be two visuals one with Month on the X-axis, the other with Product, you can then use an interaction between the two charts to allow users to see how each product sold within a month. 

 

Or, if you need both in the same visual, I suggest using a matrix to create a heat map. Place Product in the rows and month in the columns, then use conditional formatting on the values to show the highest and lowest. 

 

If this helps, please accept as the solution, it helps others with the same challenge. 

View solution in original post

3 REPLIES 3
Lanceometer
Frequent Visitor

@mark_endicott , I disagree that this is the wrong choice of visual

of course to view this unfiltered makes no sense

BUT the user will filter to reduce the amount of product and then it will display everything correct eventually

the problem with this is: The users open the dashboard unfiltered at first. so before they start filtering they will see a wrong chart. 

 

but I really like your idea of presenting it in a matrix /heatmap chart

I wil try this

 

thank you

@Lanceometer - If you'd like to explore keeping the stacked bar, may I suggest building two pages. 

 

The first will have a couple of slicers and a button to navigate you through to the 2nd page. The 2nd page will have the stacked bar (and any other visuals you need) plus the same slicers as the first page - copy and paste them and make sure they are synchronised. 

 

Make sure you hide the 2nd page so the only way it can be accessed is by clicking the button. This will hide the chart from them until they have applied some filters and navigated to the page. 

 

So there's two options for you present to your users. 

mark_endicott
Super User
Super User

@Lanceometer - The stacked bar is absolutely the wrong choice of visual for this number of products. Besides the fact it's not showing all of them, there's absolutely no way your users will be able to establish what any of this means. 

 

There's also not really any way you SHOULD fix this with DAX. 

 

Perhaps this needs to be two visuals one with Month on the X-axis, the other with Product, you can then use an interaction between the two charts to allow users to see how each product sold within a month. 

 

Or, if you need both in the same visual, I suggest using a matrix to create a heat map. Place Product in the rows and month in the columns, then use conditional formatting on the values to show the highest and lowest. 

 

If this helps, please accept as the solution, it helps others with the same challenge. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.