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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Victormar
Helper V
Helper V

Conditional formating a line chart

Hi all,

 

I am working in a line chart where I have different mesures and I would like to apply conditional formating to them.

 

Let me explain: we work with cumulative mileage data, and during some period of time we were not receiving any data. To do some of our calculations we get the delta values (difference between dates) and to fill the gaps that where we don't have data, we divide the mileage difference between the last date and the new one by the days (so if we got one reading the 1st of january for 3000 miles and the next one on the 10th of January for 6000 miles, we would "assume" this 3000 miles of difference divided by 8 days).

We also have a flag called "is_generated" to signal which data has been created and which one comes from readings.

 

Then my question comes, could it be possible to create a line chart with the mileage values, and apply some kind of conditional formating (colours or different type of line) to actually show which data is generated and which one is not?

 

Thanks in advance 🙂 I appreciate your help

4 REPLIES 4
Victormar
Helper V
Helper V

Hi all,

 

Thanks for your explanations. I have tried to do the bar chart, covnerting it to a line chart, but it doesn't look good:

 

Victormar_0-1657713023584.png

 

I saw also the charticulator video from curbal, and it looks good, although as I have many measures in the same graph, I am not sure about the maintenance in the long run, any thoughs on that?

 

Thanks again

PC2790
Community Champion
Community Champion

There is no direct way of doing it.

You can try creating a bar chart, and in formatting options, do the required color formatting 

and at the end, convert it to line chart.

gauthamboppana
Solution Specialist
Solution Specialist

@Victormar  - Yes it is possible. Please refer to this example. 
https://datacornering.com/power-bi-line-chart-marker-color-conditional-formatting/


If this post helps, please consider accept as solution to help other members find it more quickly.

amitchandak
Super User
Super User

@Victormar , for the standard line visual only with one measure and no legend, you can convert it bar, do conditional formatting and change it back to line, you will get colored markers

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...

 

Refer Curbal's video if you need a colored line using charticulator

https://www.youtube.com/watch?v=k5c-KtU2k_U

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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