Featured image of post SVG in Power BI Part 6 – New Icon Conditional Formatting

SVG in Power BI Part 6 – New Icon Conditional Formatting

Series

This is part of a series on using SVG in Power BI. The series supports my session at Power BI Days in Mechelen, Belgium in April 2019.

  1. Introduction to SVG Basics
  2. KPI Shapes in Power BI
  3. Filling up with colour using SVG in Power BI
  4. Using Text in SVG
  5. Using SVG Rotate to create a dial in Power BI
  6. SVG Icons in Conditional Formatting
  7. Using a Theme to add SVG Icons
  8. Feb 2023 Update - 5 SVG Stars

In July 2019 Power BI Desktop update they included new conditional formatting on table and matrix to include icons. These icons can be defined using SVG which is pretty cool. So this is a new post in my Power BI SVG series looking how we can use SVG icons in conditional formatting.

Quick Overview of Icon Conditional Formatting

Once you have added a table or matrix visual to your report you can in formatting in the Conditional Formatting Section turn on Icons. This will immediately add icons to the selected column. In the example below icons were added to Turnover column.

icons

Clicking on Advanced controls link opens options behind the selection of icons. The default rules are for 3 icons at icon rules

In this post though I’m looking at using SVG to define and select the icon. So I will not be using rules but will be using a measure. The example is going to be based on a measure written in a previous post, KPI Shapes in Power BI The measure decides on an up or down arrow based on another measure called Growth.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
Arrow = 
// Variables to store arrow paths
var uparrow = ""
var downarrow = ""

// Select arrow to use
var arrow = IF([Growth]>=0,uparrow,downarrow)

// Insert arrow into SVG
var svg ="data:image/svg+xml;utf8," &
         ""
            & arrow & 
         ""

RETURN svg

arrow icons

The arrow is in its own column and doesn’t resize with font sizes. With the Icon update we can add the icon to any column.

conditional formatting icons

  • Select your table visual

  • In visual format, expand Conditional Formatting

  • Select the column and turn on Icons

  • Click on Advanced Controls

  • Change Format to Field Value

  • Change Based on Field to the measure, eg Arrow

  • Click OK

based on field value

added icons

Conclusion

Icons update is an exciting one and much needed. It cuts out the need for SVG for many, which is great. Now with a little SVG we can add some conditional formatting without having to add the extra column.

2026 Laura Graham-Brown
Last updated on Friday, 14 February 2025
Built with Hugo
Theme Stack designed by Jimmy