Tutorial: Adding Custom Icons to Milestones
The Milestone Trend Analysis chart now supports the use of custom icons. This functionality allows report authors to provide additional clarity.
By adding icons that align with your organization’s branding and visual standards, users can create reports that are both more intuitive to interpret and visually engaging and consistent with corporate guidelines.
The following step-by-step guide shows you how to add and format custom icons in the Milestone Trend Analysis for Power BI.
1. Add a Table with the image/icon URLs
- Prepare your icon.
- Download or design your own icon (supported formats include: SVG, PNG, JPG and GIF).
- Make sure the image is small in size and has a transparent background for best results.
- Convert the Icon to Base64. Icons need to be provided as Base64-encoded images, including the necessary Meta-Data header. For SVGs, you can use
currentColor
for fill and border. This allows icons to dynamically adapt to the chart color settings.- Import the icon file into Power Query. You can do the Base64 conversion directly in Power BI by using the
Binary.ToText
function with theBinaryEncoding.Base64
option in Power Query. - or use external tools (search for “Base64 image encoder”) to convert your icons or images into Base64 strings. Copy the generated Base64 string.
- Import the icon file into Power Query. You can do the Base64 conversion directly in Power BI by using the
- Create a separate “Icons” Table with an ID, a Name/ Category and a URL or SVG string (Base64 code) column.
- Insert Base64 icons into the table.
- If using Power Query: the conversion is already inside the table (see Applied steps in screenshot).
- If using external tools: paste the copied Base64 strings into the appropriate column.
- Set the Data Category.
- In Power BI, change the Data category of the “Base64/URL” column to Image URL to display the image.
2. Link Tables
Connect the “Icons” table with your main dataset.
- Click Model view from the left menu.
- Click on the Manage relationships from the top menu.
- Click + New relationship.
- From the first drop-down, select your Dataset table and click the column with the Icon IDs.
- On the next drop-down, select the “Icons” table you just added and select the column with the MilestoneIcon IDs. This ensures the right icon is pulled in dynamically for each row.
- By default Cardinality is set to Many to one (*:1).
- By default the Cross filter direction is Single.
- Press OK and Close buttons.
Your “Icons” table is now linked to your dataset.
3. Build & Format visual
Add a Milestone Trend Analysis chart to your report and map the “URL” category from the “Icons” table to the Milestone icon well.
- In Power BI, open or locate the report with the Milestone Trend Analysis chart.
- Add at least the following categories: Milestone, Milestone Date, Reporting Date.
- Add the “URL” category into the Milestone icon well.
Take advantage of the additional formatting features available for the Milestones in the formatting pane and customize it according to your preferences.
Go to Format visual pane and expand the Milestones and/ or Lines cards.
For all SVGs, where currentColor
was used for fill and border; the icons will automatically adopt the corresponding legend color. You can change the Color by selecting the desired category from the Apply settings to dropdown list. You can change the icon size under Lines > Marker size.
Save your Power BI report and publish it to the Power BI service.
Considerations
If your images appear cropped or only partially displayed when using Base64 URLs, it’s likely due to Power BI’s character limit for text fields. The Power Query engine supports a maximum of 32,766 characters per text cell. Any text exceeding this limit will be truncated, resulting in incomplete image rendering.
To avoid this issue: Use SVGs where possible (smaller for icons/logos). Reduce the image resolution to minimize file size. For images, use compressed JPG format rather than PNG, since JPG files are smaller. Compress images to around 20–25 KB to stay within the Power BI character limit.