Forum Discussion
Dynamic line colours based on two slicers
- 1 year ago
Hi Bron_Smith
In Power BI, the only way to “lock” colors at the category level is through conditional formatting. Unfortunately, line charts do not support conditional line color formatting. There are multiple feature requests already open on this topic, and you can vote for them (i voted)
https://community.fabric.microsoft.com/t5/Fabric-Ideas/Conditional-formatting-to-make-legend-and-line-chart-color/idi-p/4600773So at the moment, there is no way to lock colors in a line chart.
If your chart only shows a single line, this doesn’t really matter, and if it shows many lines, too many colors will create cognitive overload anyway. In that case, you might want to consider using small multiples, where each line is shown in its own panel without relying on color differentiation.If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Hi Bron_Smith
In Power BI, the only way to “lock” colors at the category level is through conditional formatting. Unfortunately, line charts do not support conditional line color formatting. There are multiple feature requests already open on this topic, and you can vote for them (i voted)
https://community.fabric.microsoft.com/t5/Fabric-Ideas/Conditional-formatting-to-make-legend-and-line-chart-color/idi-p/4600773
So at the moment, there is no way to lock colors in a line chart.
If your chart only shows a single line, this doesn’t really matter, and if it shows many lines, too many colors will create cognitive overload anyway. In that case, you might want to consider using small multiples, where each line is shown in its own panel without relying on color differentiation.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
- Bron_Smith1 year agoFrequent Visitor
Thanks for the reply. I ended up manually selecting a colour for each of the locations, by slicing them down first. Its not ideal, as any new locations will have to be added manually as well, but its sufficient for now. New locations are not added that often!