top of page
  • Jihwan Kim

Enhancing Power BI Custom Themes with New Icons

In this blog post, I'd like to share how I learned to add new icons to Power BI Custom Themes.


Previously, I often used DAX measures with the UNICHAR function to display specific characters on Power BI reports. Sometimes, I would copy and paste emojis (like "➡️" or "❤️") directly into DAX measures. However, this approach required me to search for the correct UNICHAR codes or emojis online, which often took more time than I'd like, detracting from my focus on creating insightful reports.


Imagine if some frequently used icons, including company-specific ones, were already available in the Power BI theme for developers to choose from. This would not only save time spent searching for icons but also allow more time for developing quality Power BI reports.


Here's a look at the default icons available for developers:



Now, I'll share how I learned to add custom icons that I created in PowerPoint. The result looks something like this:



The following is a detailed, step-by-step description on how I added new icons to the custom theme in Power BI. This will help understand each phase of the process, from preparation to implementation, ensuring developers can easily replicate the steps and enhance Power BI custom themes with new icons.


When opening Power BI Desktop for the first time, I begin by customizing the current theme. I modify the colors, adjust the font size, change the border settings of visualizations, and tweak the filter pane settings to better suit my needs.



As shown in the image below, the filter pane settings have been modified.


Once I finish customizing the colors, fonts, and visual settings of the theme, it's time to add custom icons. This process begins by saving the adjusted theme in a JSON file.


I open the file using VS Code, and it looks like this:


Next, I open PowerPoint, select the icons, and change their graphic colors.


I select 8 icons that I want to add, recolor them, and place one icon per page in the top left corner, as shown in the image below.


Save these as SVG format.


When opening the first SVG file in VS Code, it looks like the example below. Copy the code and paste it into the website called SVG Viewer (www.svgviewer.dev).



I adjusted the code slightly to resize the icon and remove its background. Here’s how the modified code looks:


Next, copy the modified code and paste it back into VS Code.



Now, there are two modifications to make:

First, find all the instances of `"` and replace them with `'`.

Second, find the instance of `#` used in front of color codes and replace them with `%23`.


And then, copy it.


Add the code to create icons, then paste the modified SVG code into the middle of it, as shown in the image below. I will also share the JSON file at the end of the blog post so readers can easily open and examine how it is written.


"icons": {
          "custom icon 01": {
               "url": "data:image/svg+xml;utf8,   ",
               "description": "arrow down 01"
          }
     }


Once the first new icon is created, save the JSON file. Then, import it into Power BI Desktop.



The first new icon is successfully displayed, as shown in the image below.

Now that I have successfully created the first new icon, I repeat the step-by-step process for the remaining seven icons. I add each new icon to the code, save the JSON file, and then import it again into Power BI Desktop.






To summarize, in this blog post, I detailed the process of adding custom icons to a Power BI theme. By customizing the theme's colors, fonts, and visual settings, and then incorporating unique icons, I can significantly enhance the visual appeal and functionality of my Power BI reports.

The main benefits of this approach are improved efficiency and a more personalized user experience. Instead of spending time searching for icons and their corresponding codes, having a custom set of frequently used icons readily available streamlines the report creation process. This not only saves time but also ensures consistency across reports.



By this, I learned the importance of attention to detail and the power of customization in creating more effective and visually appealing data visualizations. By experimenting with tools like VS Code, SVG Viewer, and PowerPoint, I was able to enhance my skills and gain a deeper understanding of how to manipulate SVG files and JSON code.


I hope this helps having fun in creating custom themes with added icons in Power BI.


Link to the JSON file that I created above: GitHub

133 views0 comments

Comments


bottom of page