We're giving away 30 tickets for FREE! Share your story, your vision, or your hustle and tell us why YOU deserve a ticket.
Apply nowWin a FREE 3 Day Ticket to FabCon Vienna. Apply now
I am using the latest version of Power BI (August 2025) and can't role back to previous versions - company policy
I have roughly 250 locations that I am displaying on a line chart (not all at the same time!). They are classed by region and area, and there are a maximum of 10 locations within an area, and up to 7 areas within a region. I am using slicers for the region and area to limit the number of locations displayed on the line chart.
When I use the Region and area slicers, I want to see the colours for the locations (labelled in a table 1-10 with the appropriate hex colour code) change the colours of the line on the graph to match the hex colour in the table I have created. I can't find any way to do this. I've tried using Switch and selected values, but this limits me and if more regions, areas or locations are created then I'll have to manually add that to the switch. I don't want more than 10 colours, so I've coded each location as 1-10 with 1 being "blue" and 2 being "green" etc...
Bars and Columns on the respective visuals are all very well, but I need this to be a line chart showing each of the locations in the appropriate colour, and trying to conditional format them doesn't work because I can't select the colour I have put into the table for this purpose. I have removed the legend, and this still doesn't do what I need it to do.
Does anyone have any brilliant ideas that will make this work?
Solved! Go to Solution.
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-lin...
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.
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-lin...
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.
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!
User | Count |
---|---|
67 | |
61 | |
47 | |
35 | |
32 |
User | Count |
---|---|
87 | |
72 | |
56 | |
49 | |
45 |