...

In conditional formatting, Power BI provides a limited set of icons to represent data in visuals, which may not always meet specific requirements. To overcome this limitation, we can import custom icons using a JSON theme containing the base64 code for the icons, allowing for greater flexibility and customization in your reports.

Importing custom icons in conditional formatting for Power BI reports allows you to enhance data visualization by adding personalized and meaningful visuals. By using custom icons, you can better represent data trends, performance, or categories. This customization provides a more intuitive and engaging way to interpret report data.

Process Overview

To import custom icons into Power BI, we first download the images of our choice from websites like Flaticon and then save them to a local desktop. We then convert these images into base64 code using the website “base64-image.de”, by dragging and dropping the images there. After conversion, we have to click “Show Code” beside each image, then select “Copy to Clipboard” to copy the base64 code. We then replace the image URL in the JSON code with the copied base64 code and save the file with .json extension. Finally, we upload the JSON file into Power BI by navigating to View > Themes (by clicking the dropdown beside Themes) and selecting “Browse for themes” to upload the file.

Deep Dive into the process for Displaying Custom Icons in Power BI reports

Shown below is a Step-by-Step process of Importing custom icons in conditional formatting:

  • Download icons from websites like Flaticon.net or any other site of your choice and save them to your desktop. Flaticon is one example, but you can use other sources as well.
Custom Icons in Power BI
  • Convert the image into a base64 code using the website base64-image.de. This will generate the code for embedding the icon in your Report.
  • You can drag and drop multiple images onto the website. Then, click “Show Code” beside each image/icon, and in the pop-up window, select the “Copy to Clipboard” option to copy the code.
Custom Icons in Power BI
  • Copy the code of each image and paste it in place of the image URL in the appropriate section of the JSON code syntax.
  • Save the file with the .json extension with the proper filename.
  • Upload the json file into Power BI by following these steps: go to View > Themes, click the dropdown arrow beside Themes, select Browse for themes, and then upload the .json file.
    • Once you have uploaded the custom JSON file containing the base64-encoded icons into Power BI, you can then apply them to your visuals. When you select any column in a visual and navigate to Conditional Formatting > Icons, the custom icons defined in the JSON file will appear as options. You can then use these icons to format your data based on specific conditions, providing a more personalized and intuitive visual representation of your data.
Custom Icon in Conditional Formatting

Screenshot of a selecting Custom Icon in Conditional Formatting

Example of a Custom Icon displayed using Conditional Formatting

The table below is a small dataset created within Power BI using the “Create Table” option, consisting of “Accessories” and “Price” columns.

The custom icons can now be added to the “Accessories” column through conditional formatting, with the icons imported into Power BI via a JSON theme.

Benefits of this Custom Icon in Power BI solution

  • Customization Flexibility: Allows the use of custom icons that match specific branding or reporting needs, providing more control over the visual appeal.
  • Enhanced User Experience: Custom icons help to make reports more intuitive and easier to interpret, improving data visualization.
  • Avoid Limitations: Overcomes Power BI’s default icon limitations by enabling the use of any icon, whether from Flaticon or other sources.
  • Efficiency: Base64 encoding eliminates the need for external hosting, making the icon integration process simpler and faster for users.

Summary

Displaying Custom Icons in Power BI reports using Conditional Formatting is a very efficient way of personalized visual appeal, effective data interpretation, and faster decision-making with consistency and clarity.  We need to download the desired images from any source to import custom icons into a reporting tool like Power BI and save them locally.

This is followed by converting these images into base64 code using an online conversion tool, copying the generated base64 code, and integrating it into the appropriate JSON file section. The saved JSON file is then uploaded into the Power BI reporting tool via the themes or formatting options to apply the custom icons.

This process allows for greater flexibility in visualizing data with personalized icons, which has been tried and tested in various client engagements for more enhanced and effective reporting and insights.