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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Sabz13
New Member

Bespoke icon for conditional formatting

Hi team, I need to create new bespoke icons using images from our comms team. So, for example, when a team name is used in a graph instead of the 'name' being displayed the 'icon/image' is displayed instead.


I have looked through the different forms around customising icons etc but can't see one on using a bespoke icon, and a proper step by step ‘dummies guide’ to getting this into the Power BI icon drop down list (as shown below).

Or is there a better way to do it? A rule when the 'text' is used then use the corresponding ‘image’? Not sure how that would work??


NOTE: All bespoke icons from comms are currently PNG files.

 

 

Sabz13_0-1697577640341.png

 

1 REPLY 1
OwenAuger
Super User
Super User

Hi @Sabz13 

Here are some suggested answers:

 

Note 1: I have attached a JSON file containing 4 custom icons, and a PBIX using those icons.

Note 2: In code blocks, the forum converts colon characters to &colon. If you are copying the code, please change these back to actual colon characters 🙂

 

1. Adding Icons to Theme

 

{
"name": "Custom Icons",
  "icons": {
    "Checkers": {
      "description": "My Grey Checkers",
      "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII"
    }
  }
}

 

 

2. Applying these icons in Power BI Desktop

  • After adding the Theme in Power BI Desktop, the icons are visible in the drop-down list in the Icon Conditional Formatting dialog box.
  • Note that the "description" shows on hover.
  • You can also create a measure that returns the icon's name (e.g. "Pennywise" in my example), and select this measure when using Format Style = Field Value.
  • In my PBIX, I added an "Icon" column to my table which contains valid icon names as text, and created a Selected Icon measure which retrieves the current text value from this column. As long as the value returned by the measure is a valid icon name, this will work fine.

 

Selected Icon = 
SELECTEDVALUE ( Score[Icon] )

 

 

Some screenshots below:

 

Icon drop-down menu:

OwenAuger_0-1697618129870.png

Field value method with measure [Selected Icon]

OwenAuger_1-1697618342729.png

Visual with conditional formatting using icons

OwenAuger_2-1697618565951.png

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

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 Kudoed Authors