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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors