Select Distinct Logo Clear Background

Business Analytics Blog

Conditional Format a line chart in Power BI

Conditional Formatting a line chart in power bi cover

How to Conditional format a line chart in Power BI

(This is a workaround to show you how you can conditional format a line chart in Power BI)

Power BI does not at first seem to have an option to add conditional formatting to a line chart, but, there is a way to make it work, although it takes a few simple steps to do it

here is of the summary of the steps required

  1. Create a bar chart
  2. Apply conditional formatting to the bar chart
  3. Change the bar chart to a line chart and the conditional format remains

Because this a workaround it may mean that at some point Microsoft stops this working, but there will hopefully be an official method to ensure that we can still apply conditional formatting to a line chart

Step 1

The first step is to create a normal bar chart, in this example we use a stacked column bar chart

Here we can see Gross Sales by Month across a year of data

A standard bar chart in power bi

Step 2

Next, we apply the normal conditional formatting rules

to do this in the formatting area, select the ‘fx’ icon next to the default colour option

we have defined fixed bands with blue representing low sales, red for medium and green for high

Conditional format options in Power BI

A bar chart with conditional formatting applied in Power BI

Step 3

Finally we just need to change it to a line chart, and the conditional formatting we defined earlier is preserved

With the bar chart selected, go over to the visualisations pane and click the line chart icon, the chart is changed to a line chart and the conditional formatting is preserved

Conditional format a line chart in power bi, this is a line chart with the plot points coloured using conditional formatting

And there you have it, how to conditional format a line chart in Power BI

Here is a short video which explains these steps in a little more detail


Many users have asked us how to conditional format a line chart in Power BI, this work around shows how it can be done

Blog post by Simon Harrison
Simon Harrison

Simon Harrison Founder of Select Distinct Limited and a business intelligence expert

Subscribe to our channel to see more Power BI Timesavers

Select Distinct YouTube Channel

Our Business Analytics Timesavers are selected from our day to day analytics consultancy work.  They are the everyday things we see that really help analysts, SQL developers, BI Developers and many more people.

Our blog has something for everyone, from tips for improving your SQL skills to posts about BI tools and techniques. We hope that you find these helpful!

Business Analytics Blog

You can find our other Power BI Blog posts in this archive

Power BI Archives – Select Distinct