Power BI technique · built-in features only

How to use custom icons in Power BI conditional formatting

By · Founder & Reliability Engineer · Updated

Power BI's Icons conditional formatting has built-in sets (arrows, shapes, flags, ratings). For your own icons, put them in the theme: a theme's top-level "icons" object maps names to image URLs, and after importing the theme they can be picked in the Icons dialog. For icons chosen by data, use Format style: Field value with a column or measure that returns an image URL.

When to use it. Use it in tables and matrices when a status, trend or category should read at a glance and the built-in sets don't match your report's style. For a whole KPI card drawn as an image, an SVG measure is the better tool.

Worked example

Worked example · Halden Outdoor · revenue vs target by region

RegionRevenueTargetvs Target
North$1,240,000$1,167,600+6.2%
West$1,310,000$1,304,800+0.4%
South$980,000$1,001,000−2.1%
Central$870,000$914,800−4.9%
East$1,100,000$1,188,000−7.4%
Islands$210,000—(blank)
Rules: ≥ 0% check, ≥ −5% warning, below −5% cross; a region without a target returns BLANK and shows no icon.

Halden Outdoor is a fictional retailer with six sales regions. The table above shows revenue against target for each region and one icon column driven by the same three thresholds as the Status Icon URL measure: zero or better gets the check, down to minus five percent gets the warning triangle, anything worse gets the cross.

Two regions clear their target (North and West, with West only +0.4% ahead), two sit in the warning band and one is off track. Central, at −4.9%, is the row that tests your rule order: it is inside the warning band by a tenth of a point, so a rule written as "less than −5%" and a rule written as "less than or equal to −5%" give the same result here but would not for a region at exactly −5.0%. East, at −7.4%, is the only cross.

Islands has no target yet. The measure's ISBLANK branch returns BLANK, so the cell is empty instead of showing a red cross for a region that simply has nothing to be measured against. That empty cell is a decision, not an accident: an icon that says "off track" when the truth is "not tracked" sends people chasing the wrong problem.

Steps

  1. 1

    Pick the icons and colour them

    Choose three to five icons that differ in shape, not only colour (for example a check, a warning triangle and a cross), and colour each for its state.

  2. 2

    Build a theme with an icons block

    A report theme can carry an "icons" object: each entry has a url (a data URI or web URL) and a description. Importing a theme replaces the current one, and anything the file leaves out falls back to Power BI's defaults, so paste the icons block into your current theme JSON (export it from Customize theme or Theme Lab) and import that. A theme that holds only the icons block is safe only on a report that uses no custom theme.

    {
      "name": "Status icons",
      "icons": {
        "status-good": { "description": "On track", "url": "data:image/svg+xml;utf8,<svg …>" },
        "status-warn": { "description": "At risk", "url": "data:image/svg+xml;utf8,<svg …>" },
        "status-bad":  { "description": "Off track", "url": "data:image/svg+xml;utf8,<svg …>" }
      }
    }
  3. 3

    Import the theme

    In Power BI Desktop: Design ribbon → Import theme, and select the JSON file. In the Power BI service, use the View → Theme pane.

  4. 4

    Add icon rules to the column

    Select the table or matrix, open the field's menu in the Values well → Conditional formatting → Icons. Set Format style to Rules, choose the field the rules test, and set the ranges (for example ≥ 0, ≥ −5%, < −5%).

  5. 5

    Swap in your icons

    In each rule's icon dropdown, pick your theme icons instead of a built-in icon. Set Icon layout (left, right or icon only) and alignment, then OK.

  6. 6

    Or choose icons with a measure

    With Format style: Field value, point the icons at a column or measure that returns an image URL per row. Microsoft's page names web URLs and OneLake files; SVG data URIs returned from a measure are a common pattern too, so test them in the Service before you rely on them.

    Status Icon URL =
    VAR v = [Revenue vs Target %]
    RETURN
        SWITCH (
            TRUE (),
            ISBLANK ( v ), BLANK (),
            v >= 0, "data:image/svg+xml;utf8,<svg …good…>",
            v >= -0.05, "data:image/svg+xml;utf8,<svg …warn…>",
            "data:image/svg+xml;utf8,<svg …bad…>"
        )

How it works

Icon rules are evaluated per cell, after the visual has aggregated the field the rules test. That is why a rule on a percentage column works on the percentage the row shows, not on the underlying transactions. The rules run top to bottom and the first match wins, which is why ranges should never overlap.

Field value mode works differently: Power BI asks the measure for a value for each row and draws whatever image that value points to. The decision moves out of the dialog and into DAX, where it can use several measures at once (variance and confidence, or variance and volume), and where the same measure can feed a table, a matrix and a card title so every visual agrees.

Theme icons are stored in the report with the theme. When the theme file is imported, its icons become choices in the Icons dialog alongside the built-in sets, so a report built on a corporate theme can use the company's own status symbols without any image hosting.

Variations

  • Put the icon in its own narrow column with Icon only layout, so the numbers stay aligned and the icon column can be sorted by status.
  • In a matrix, apply the rule to subtotals as well as values; turn it off for the grand total if the total is not meaningful against target.

Check that it works

Hover a few icons in Desktop and read the cell value next to them: every check should sit on a value of zero or more, every triangle between zero and the warning threshold, every cross below it. Then sort the table by the tested column; the icons should form three unbroken blocks. A stray icon inside the wrong block means two rules overlap or a range was typed as a whole number instead of a percentage.

Publish to a test workspace and open the report in the browser before you share it. Confirm that theme icons and any data-URI icons from a measure render there as they do in Desktop. An icon that points at a web URL also depends on that address staying reachable and public, so check it from a browser that is not signed in to the image host.

Finally, print or export the page to PDF in greyscale. If you can still tell good from bad, the shapes carry the meaning on their own.

Common mistakes

  • Inside a utf8 data URI, write # as %23; a raw # ends the URL and the icon disappears.
  • Rules are evaluated per cell in order; overlapping ranges show the first match.
  • Icons alone fail in greyscale print and for colour-blind readers unless the shapes differ.
  • Older Desktop builds put theme import under View → Themes → Browse for themes; tutorials that say so describe the same action.
  • Keep the thresholds in one place (a measure or a small parameter table); copying −5% into three dialogs guarantees they drift apart.

FAQ

Can I use these icons in a card or chart?

Icons conditional formatting is for tables and matrices. For cards, use a measure with Data category Image URL or an SVG measure; charts can't show icons per data point natively.

Do theme icons travel with the report?

Yes. The theme, including its icons, is saved in the report file and published with it.

Sources

Menu names follow Power BI Desktop as documented on Microsoft Learn; they can move between releases. The companies and figures in the worked example are invented.

Related

Assets and guides that go with this technique.

More Power BI techniques

Make the report.
Then make it yours.

The Design Studio, templates and tools are free with no account (exports carry a small VizForge mark until you sign in). Sign up when you want AI: 5 credits on us, no card.

Generated visuals are type-checked and built before you download them; one that fails the quality SLA refunds its credits. See all features or pricing.