Forum Discussion

Lanceometer's avatar
Lanceometer
Helper I
1 year ago
Solved

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

 

 

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

 

 

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?

  

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

3 Replies

  • 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

    • mark_endicott's avatar
      mark_endicott
      Super User

      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. 

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