Power BI – Conditional Formatting Update

Last modified date

The June 2019 update for Power BI included a few updates for conditional formatting, for visual backgrounds, titles, cards and gauges. This post is my take on the updates and on how I prefer to do the logic behind choosing a colour. 

Full details of the June 2019 update can be found at
https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-june-2019-feature-summary/

Applying Conditional Formatting 

This update added to the places conditional colour formatting can be applied. In every place the method of applying conditional formatting is the same, the trick is working out which visuals will let you do what. 

When you look at a visual’s formatting properties, right click on a colour selector. If Conditional Formatting appears then you can add rules if nothing appears then you can’t. 

test right click

When conditional formatting is applied the colour is shown as Fx symbol.

fx symbol

List of Locations for Conditional Formatting

VisualSectionProperty
Most VisualsTitleFont color
Most VisualsTitleBackground color
Most VisualsBackgroundColor
Stacked Bar ChartData colorsDefault color*
Clustered Bar ChartData colors Default color*
Stacked Column Chart Data colors Default color*
Clustered Column Chart Data colors Default color*
Line and Stacked Column ChartData colorsDefault color*
Line and Clustered Column ChartData colorsDefault color*
Scatter ChartData colors Default color
TreemapData colorsAdvanced Controls
FunnelData colorsDefaullt Color
GaugeData colorsFill
CardData labelColor
CardCategory labelColor
TableConditional FormattingBackground Color
TableConditional formattingFont color
Matrix Conditional formatting Background Color
Matrix Conditional formatting Font color
MatrixConditional formattingsData bars

Applying Conditional Formatting

There are three methods of applying conditional formatting once you’ve done the right click and selected Conditional Formatting, color scale, rules, and field value.

Colour Scale

colour scale dialog

Rules

rules for formatting

Field Value

field value

Colour Measures

One of my issues with conditional formatting Color scale or Rules is you cannot use multiple column values or measures in the colour choice. Field Value gives a work around for this by allowing you to use a Measure.

I have a very simple example of a list of Stores which have a Target and Sales value. So I create a measure that calculates a colour string based on Sales and Target using an IF function.

SalesColour = IF(
    SUM(Sales[Sales]) >= SUM(Sales[Target]), 
    "#006400", // Green
    "#BF0000"  // Red
)

I then used Field Value conditional formatting to format a gauge fill.

guages

Conclusion

Conditional formatting is getting there but it is still limited, and we have been spoilt by Excel. I expect more updates will come and I will need to update the table above.

Over 20 year experience at being passionate about training, solving problems and loving a new challenge especially in the Microsoft's Power Platform suite.