Forum Discussion

eloibf's avatar
eloibf
New Member
25 days ago

Bug: Legend changes to "(Blank)" when Initial Scroll Position is set to End

Hi,

I believe I have found a bug related to the new Initial Scroll Position setting on the X-axis.

Environment

  • Power BI Desktop 2.158.1177.0 (64-bit)
  • Power BI Service (app.powerbi.com)

Steps to reproduce

  1. Create a stacked column chart.
  2. Add a categorical field to the Legend (e.g. A, B, C, D).
  3. Configure the visual so that a horizontal scrollbar appears (for example, by increasing the Minimum category width).
  4. Set X-axis > Presentation > Initial Scroll Position = End.
  5. Verify that the legend displays correctly.
  6. Go to Data colors or Labels and modify one of the legend categories.
  7. The legend immediately becomes "(Blank)" and the category names are no longer recognized.

Expected behavior

  • The legend should continue showing the actual category names.
  • It should remain possible to customize colors and formatting for each legend category.

Actual behavior

  • The legend changes to "(Blank)".
  • The categories disappear from the formatting pane.
  • Individual color customization is no longer available.
  • The visual itself still renders correctly, but any formatting option related to the legend field appears to be broken (data colors, labels, category-specific formatting, etc.).

Additional observations

  • I can reproduce the issue in a brand new PBIX file using a simple sample dataset.
  • The issue only occurs when Initial Scroll Position = End.
  • If Initial Scroll Position = Start, everything works correctly.
  • The problem is triggered after changing a category color or modifying category-specific formatting.
  • The issue is reproducible in both Power BI Desktop and the Power BI Service.

Has anyone else experienced this issue?

Thanks.

3 Replies

  • Your repro is very clear, and it points at the trigger: the breakage happens when per-category formatting is written while Initial Scroll Position is End, not because End is set at all.

    A workaround until it's fixed: set Initial Scroll Position back to Start, make all your Data colors / per-category label changes, then switch it to End as the very last step. In the cases I've seen like this, the category-specific formatting survives as long as it isn't edited while End is active. If a visual is already showing "(Blank)", switching back to Start doesn't always bring the categories back, so it can be quicker to duplicate a clean copy of the visual and redo the colours there.

    Since you can reproduce it in a brand-new PBIX in both Desktop and the Service, it's worth raising through Power BI Support with this exact repro and your build number (2.158.1177.0), and checking the Microsoft Known Issues page in case it's already listed.

  • Good catch, and the steps to reproduce are really clear. The fact that the issue only appears when the Initial Scroll Position is set to End makes it seem like there’s a specific interaction between the scroll setting and legend formatting.

  • jubinsoni's avatar
    jubinsoni
    Icon for Skilled Sharer rankSkilled Sharer

    Hi eloibf​,

    Building on the workaround above: if you need both "End" scrolling and custom colours, you can avoid the trigger entirely by not using per-category formatting at all. Per-category colours are stored as selectors on each legend value, and that write is what seems to break with End. Two alternatives that do not create those selectors:

    1. Colours from the theme, ordered to match your legend sort:

    {
      "name": "Legend colours",
      "dataColors": ["#1F77B4", "#FF7F0E", "#2CA02C", "#D62728"]
    }

    2. Conditional formatting (fx) on Columns > Colors with a measure, if the colour must follow the category name rather than the order (availability depends on the chart type and whether a legend field is used, so check your visual first):

    Category Colour =
    SWITCH (
        SELECTEDVALUE ( 'Table'[Category] ),
        "A", "#1F77B4",
        "B", "#FF7F0E",
        "C", "#2CA02C",
        "D", "#D62728",
        "#999999"
    )

    If a visual is already broken, check for and remove the per-category colour overrides (Reset to default on Data colors) before re-applying End. And since you have a clean repro in both Desktop and Service, it is worth posting it on the Fabric Issues / Ideas site or a support case so it gets tracked.

    So my overall approach would be:

    Reset per-category colours on the affected visual
    -> Apply colours via theme dataColors (or fx measure)
    -> Set Initial Scroll Position = End
    -> Report the repro so the selector bug gets fixed

    AI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.