- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Line chart: Many color for the same line
Hello everyone,
I’d like to know if any of you have found a way to change the color of a line chart based on its values.
Here a picutre of what I'm trying to achieve:
The color change depending of the value
Higer than 3, it should be green
Between 3 and 2.5 yellow
Between 2.5 and 2 orange
And lower than 2 red
Any idea of how can I achieve that?
Many thanks in advance for your help 🙂
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Testy
The quick solution is:
Create a column chart of your visual.
Make a new measure with your conditions:
Hope this helps!
The other option is create three seperate measure to show the lines and format them different colurs.
Only issue with that is getting the lines continius
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Create a New Measure for Each Color Band
GreenValues = IF( [YourMeasure] > 3, [YourMeasure], BLANK() )
YellowValues = IF( [YourMeasure] <= 3 && [YourMeasure] > 2.5, [YourMeasure], BLANK() )
Similarly create for others....
Drag each of the newly created measures on Y axis. In the Visualizations Pane, go to Format.
Under Data Colors, assign green to GreenValues, yellow to YellowValues, orange to OrangeValues, and red to RedValues.
If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Testy
Did the solution @Kedar_Pande and @SamWiseOwl offered help you solve the problm, if they helps, you can consider to accept them as solutions so that more user can refet to.
Best Regards!
Yolo Zhu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Create a New Measure for Each Color Band
GreenValues = IF( [YourMeasure] > 3, [YourMeasure], BLANK() )
YellowValues = IF( [YourMeasure] <= 3 && [YourMeasure] > 2.5, [YourMeasure], BLANK() )
Similarly create for others....
Drag each of the newly created measures on Y axis. In the Visualizations Pane, go to Format.
Under Data Colors, assign green to GreenValues, yellow to YellowValues, orange to OrangeValues, and red to RedValues.
If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Testy
The quick solution is:
Create a column chart of your visual.
Make a new measure with your conditions:
Hope this helps!
The other option is create three seperate measure to show the lines and format them different colurs.
Only issue with that is getting the lines continius
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
02-13-2025 02:00 PM | |||
10-23-2024 09:04 AM | |||
12-08-2024 02:43 PM | |||
10-18-2024 06:19 AM | |||
12-24-2024 11:19 PM |
User | Count |
---|---|
114 | |
92 | |
84 | |
54 | |
46 |