Forum Discussion
Paginated Report Line Chart – Series Color Expression Not Applying Correctly Per Legend
Hi All,
I am working on a Power BI Paginated Report and using a Line Chart with Product Name as the Legend.
I have configured a Color expression for the series, for example:
If ProductName = 'A' → Blue
If ProductName = 'B' → Red
If ProductName = 'C' → Green
(and so on, total ~6 products / colors)
The expression is defined in:
Chart → Series Properties → Fill → Color → Expression
However, the issue I am facing is:
The colors defined in the expression are not consistently applied to the correct legend values
For example:
Product A is sometimes rendered in Red instead of Blue
Product B may take another product’s color
It looks like the colors are being assigned based on rendering order rather than the actual ProductName condition
Expected Behavior
Each legend value should always use the color defined in the expression:
Product A → Blue
Product B → Red
Product C → Green
Actual Behavior
Colors are mismatched across legend items even though the expression logic is correct.
Questions
Is this a known limitation or bug in Paginated Reports line charts?
Is there a recommended way to force deterministic color mapping per legend value?
Should the color expression be applied at a different level (e.g., series group instead of series)?
Are there any workarounds (such as sorting, hidden groups, or custom palettes)?
Any guidance or confirmation would be appreciated.
Thanks,
Anusha. V
Hi Anusha__v , Thank you for reaching out to the Microsoft Community Forum.
This is a known limitation. In SSRS / Power BI Paginated Reports, when a line chart uses a dynamic legend (series group), colours are assigned to series instances at render time. Those instances are created and reused based on internal rendering order, not permanently bound to a specific legend value like ProductName. As a result, even correct colour expressions can appear to move between products when the data shape or render order changes. Sorting the dataset, series group or returning the colour from the dataset may not fix this, because the renderer does not maintain a stable key-to-color mapping.
If you need deterministic colours, the only reliable solution is to avoid a dynamic series group. Define one static series per product (or pivot the data so each product is its own value column) and set the colour directly on each series. This forces a one-to-one relationship between product and series and guarantees consistent legend colours. With a fully dynamic legend, there is currently no supported way in paginated reports to lock colours to specific legend values.
3 Replies
- rohit1991Super User
Hii Anusha__v
To get deterministic colors, the usual workaround is to create a separate series group per product (or per color group), or return the color from the dataset and bind it at the series group level, ensuring stable sorting. Applying the expression only at the series level without a fixed grouping will remain non-deterministic.
- v-hashadapuCommunity Support
Hi Anusha__v , Thank you for reaching out to the Microsoft Community Forum.
This is a known limitation. In SSRS / Power BI Paginated Reports, when a line chart uses a dynamic legend (series group), colours are assigned to series instances at render time. Those instances are created and reused based on internal rendering order, not permanently bound to a specific legend value like ProductName. As a result, even correct colour expressions can appear to move between products when the data shape or render order changes. Sorting the dataset, series group or returning the colour from the dataset may not fix this, because the renderer does not maintain a stable key-to-color mapping.
If you need deterministic colours, the only reliable solution is to avoid a dynamic series group. Define one static series per product (or pivot the data so each product is its own value column) and set the colour directly on each series. This forces a one-to-one relationship between product and series and guarantees consistent legend colours. With a fully dynamic legend, there is currently no supported way in paginated reports to lock colours to specific legend values.