Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Color code for line chart

Hello All,

 

I am new to power Bi.

I have a line chart and I need to color the bars based on its value

But when I go to data colors I dont see condtional formatting option.
Could any one please help how to fix this


Color Condition:

KPI[value] % = SWITCH(TRUE(),
[value] <= 0.047, "Green",
[value] <= 0.067, "Green",
[value] <= 0.087, "Yellow",
[value] <= 0.107, "Red",
"Red")

 

1 ACCEPTED SOLUTION

As of now I don't think we have such a feature available to apply conditional formatting on the line color.
However as I told you that you can convert your line chart to bar chart, apply the conditional formatting and then again turn it to a line chart.
It will change the bar marker color.
You can try that.

Thanks,
Sanket

If this post helps, then mark it as 'Accept as Answer' and give it a thumbs up.

View solution in original post

6 REPLIES 6
v-henryk-mstf
Community Support
Community Support

Hi @Anonymous ,

 

Agree with @SanketBhagwat  suggestion.

 

If the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.


Looking forward to your feedback.


Best Regards,
Henry

PC2790
Community Champion
Community Champion

You can find the conditional formatting option in the "Color" section of Formatting options as below:

PC2790_0-1650955689995.png

 

SanketBhagwat
Solution Sage
Solution Sage

Hi @Anonymous .

Can you please confirm whether you want to conditional format the line color or bar?
Because if you are using a Line chart, then you won't see the bars in there.

Thanks,
Sanket

Anonymous
Not applicable

Hi

 

I want to change the line color

As of now I don't think we have such a feature available to apply conditional formatting on the line color.
However as I told you that you can convert your line chart to bar chart, apply the conditional formatting and then again turn it to a line chart.
It will change the bar marker color.
You can try that.

Thanks,
Sanket

If this post helps, then mark it as 'Accept as Answer' and give it a thumbs up.

There is also one workaround which you can try.
Create a clustered column or bar chart and apply the conditional formatting rules under column colors sections and then turn that visual to a line chart.


Thansk,
Sanket


If this post helps, then mark it as 'Accept as Answer' and give it a thumbs up.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors