Forum Discussion

Emmy88_'s avatar
Emmy88_
Advocate I
4 months ago
Solved

Legend Format for Line Column Chart

Hi all,   I am trying to adjust the legend for a line column chart:     The legend is based on department data, which is used merely for the columns:       For the lines i used s...
  • Ritaf1983's avatar
    4 months ago

    Hi Emmy88_ 

    Regarding your technical questions about the legend:
    To control the sorting of the legend, you need to add a sort column to your category table and use the "Sort by Column" feature. Keep in mind that this sort order will also dictate the stack order on the chart (the first item will start at the bottom, closest to the 0 baseline).
    However, the built-in legend in Power BI does not support hiding specific items (like the blank row) without filtering the underlying data, nor does it allow you to force line values to the top. The best workaround for this is to disable the default legend and build a custom one using text boxes, shapes, or a small separate table visual.

    On a separate note, from a UX and data visualization perspective, this specific chart type is highly problematic to decode:

    Comparison Difficulty: Users can only accurately compare the category that sits on the bottom baseline. The other segments start at different heights, which distorts visual perception.

    Cognitive Overload: There are simply too many elements and colors to process effectively.

    Dual Y-Axes: Using two Y-axes makes the chart harder to read and can create misleading correlations.

    I highly recommend breaking this chart down into Small Multiples (like the example attached). This gives each category its own baseline and makes the data much easier to analyze.

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

  • danextian's avatar
    4 months ago

    Hi Emmy88_ 

     

    Removing a series from the legend also removes it entirely from the visual.

    It would have been straightforward if you didn’t need to bring the line series to the top. Normally, you could handle this with two separate visuals—one with the legend turned off, and the other showing only the legend.

     

     

    To achieve your desired outcome, create a separate legend table with manual sorting. Then use a list slicer with SVG circle icons that match the colors in your chart.

     

    Please see the attached pbix.

  • v-ssriganesh's avatar
    4 months ago

    Hi Emmy88_,

    Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to danextianRitaf1983ryan_mayu & LED_General for sharing valuable insights.

     

    Could you please confirm if your query has been resolved by the provided solutions? This would be helpful for other members who may encounter similar issues.

     

    Thank you for being part of the Microsoft Fabric Community.

  • v-ssriganesh's avatar
    4 months ago

    Hello Emmy88_,

    We hope you're doing well. Could you please confirm whether your issue has been resolved or if you're still facing challenges? Your update will be valuable to the community and may assist others with similar concerns.

    Thank you.