Power BI: Unicode Characters in Visualizations

A common requirement is to convert text-based values into colorful icons in Table or Card visualizations. Tools like Microsoft Power BI and TIBCO Spotfire make it easy to map specific data values or ranges to default icons through conditional formatting. However, because Card visualizations display the result of a measure rather than individual row values, displaying an icon requires a combination of DAX (Data Analysis Expressions) measures and Unicode characters.

The following examples demonstrate two approaches, although the DAX approach is the primary focus. The STATUS column uses the default icons from conditional formatting in a Table visualization. The MEASURE STATUS ICON column uses a DAX measure to output a Unicode character, which is then colored with another DAX measure and conditional formatting. The DAX method is more versatile, as it can also be applied to other visualizations, like the Card visualization shown in the second image.

Screenshot of a formatted table visualization using conditional formatting, DAX measures, and Unicode characters in Power BI.
Power BI: Formatted Table Visualization Using Conditional Formatting, DAX Measures, and Unicode Characters
Screenshot of a formatted card visualization using DAX measures and Unicode characters in Power BI.
Power BI: Formatted Card Visualization Using DAX Measures and Unicode Characters

Instructions

Step 1: Create Underlying Data

To demonstrate this, the underlying data is a list of PROJECT NAME and STATUS pair values in an Excel worksheet. The valid STATUS values are:

Screenshot of the underlying data table in Excel.
Excel: Project Name and Status List

Step 2: Import Data

Begin by creating a new report in Power BI and importing the Excel file with the PROJECT NAME and STATUS list.

Click Import data from Excel and select the file.

Screenshot of the 'Data Sources' screen in Power BI.
Power BI: Data Sources

Step 3: Transform Data

During the import process, transform the data if the column headings are not recognized. In the screenshot below, the columns are labeled Column1 and Column2 instead of PROJECT NAME and STATUS.

  1. Click Transform Data.
Screenshot of the data import process 'Navigator' screen in Power BI.
Power BI: Load Data
  1. The Power Query editor opens.
  2. From the Home ribbon, in the Transform section, click Use First Row as Headers.
  3. Select Use First Row as Headers.
  4. Rename the query/table to PROJECT DATA (used to reference this table in the DAX measures below).
Screenshot of the query step to use the first row as headers in Power Query.
Power Query: Use First Row as Headers

Step 4: Map Status Values to Numeric Codes

In this step, the text-based STATUS values are mapped to numeric values. This makes conditional formatting and DAX measures easier to configure later. It also centralizes the mapping, so if a status label changes, it only needs to be updated in one place rather than throughout multiple DAX measures and formatting rules.

  1. Switch to the Table view.
  2. From the Table tools ribbon, click New column.

Using a SWITCH function, the text-based STATUS values are mapped to numeric values. Increments of 100 are used, although any unique integers will work. The new column is named STATUS NUMERIC:

STATUS NUMERIC =
SWITCH (
  [STATUS],
  "Not Started", 100,
  "On Track", 200,
  "At Risk", 300,
  "Off Track", 400,
  "Complete", 500
)
Screenshot of the configuration to add a new column mapping text values to numeric using a SWITCH function in Power BI.
Power BI: Add New Column to Map Text Values to Numeric

Step 5: Create DAX Measures

With numeric values now in the STATUS NUMERIC column, they can be used by two DAX measures: one returns a Unicode character and the other returns a hexadecimal color value.

  1. From the Home ribbon, click New measure.
  2. Add the following code to create the ICON measure.
  3. Repeat this process to create the ICON COLOR measure.

The numeric arguments passed to UNICHAR() are Unicode code points.

UNICHAR() supports any Unicode code point, so the icon set is not limited to the symbols used in this example. Geometric shapes, arrows, check marks, warning symbols, and even emoji can be used, although rendering depends on the font selected for the visualization and the fonts available on the user’s system.

MEASURE STATUS ICON =
  VAR vStatusNumeric =
    SELECTEDVALUE ( 'PROJECT DATA'[STATUS NUMERIC] )
  RETURN
    SWITCH (
      TRUE (),
      vStatusNumeric = 100, UNICHAR ( 8210 ),
      vStatusNumeric = 200, UNICHAR ( 11044 ),
      vStatusNumeric = 300, UNICHAR ( 9650 ),
      vStatusNumeric = 400, UNICHAR ( 9670 ),
      vStatusNumeric = 500, UNICHAR ( 9675 )
    )

Most standard Power BI fonts support these Unicode characters, but if a symbol does not render correctly, try switching the visual to another font such as Segoe UI.

SELECTEDVALUE() returns a value only when the filter context has narrowed STATUS NUMERIC down to a single row; otherwise it returns blank (or a specified fallback). For the Card visualization, that narrowing must come from something outside the visual itself, such as a Slicer or a Bookmark set to a single PROJECT NAME.

The measure returns hexadecimal RGB color values corresponding to black, green, yellow, and red. They are custom RGB values rather than the predefined HTML named colors. The 500 value is excluded from the color measure, as its default font color is already as expected.

MEASURE STATUS ICON COLOR =
  VAR vStatusNumeric =
    SELECTEDVALUE( 'PROJECT DATA'[STATUS NUMERIC] )
  RETURN
    SWITCH (
      TRUE(),
      vStatusNumeric = 100, "#000000",
      vStatusNumeric = 200, "#84C28A",
      vStatusNumeric = 300, "#F9D087",
      vStatusNumeric = 400, "#F78272"
    )
StatusNumeric CodeIconCode PointHex Color
Not Started1008210#000000
On Track20011044#84C28A
At Risk3009650#F9D087
Off Track4009670#F78272
Complete5009675(default)
Mapping Quick Reference

NOTE: Although a standard SWITCH() would also work here, using SWITCH(TRUE()) makes it easy to replace equality checks with ranges or more complex conditions later.

Step 6: Create Table Visualization

  1. Switch to Report view.
  2. Add a Table visualization.
  3. Add the PROJECT NAME, STATUS, and MEASURE STATUS ICON fields as Columns in the Table.

In the next steps, default icons are added to the STATUS column using conditional formatting with color applied to MEASURE STATUS ICON using a DAX measure. As shown in the screenshot, the DAX measure mapping numeric status to Unicode characters is working.

Screenshot of the unformatted table visualization in Power BI.
Power BI: Unformatted Table Visualization

Step 7: Conditional Formatting for Default Icons in Table Visualization

  1. Click the STATUS field in the Columns list for the Table visualization.
  2. Select Conditional Formatting, then Icons.
  3. Follow the screenshot to configure the formatting using the STATUS NUMERIC column created earlier, as shown. Power BI’s built-in icon rules operate on numeric values rather than the displayed text.
Screenshot of the conditional formatting configuration for default icons in Power BI.
Power BI: Conditional Formatting for Default Icons

After applying conditional formatting, the STATUS column in the Table visualization will show icons.

Screenshot of a partially formatted table visualization in Power BI.
Power BI: Partially Formatted Table Visualization

Step 8: Conditional Formatting for Unicode Characters in Table Visualization Using DAX Measures

In this step, color is applied to the Unicode character icons.

  1. Click the MEASURE STATUS ICON field in the Columns list for the Table visualization.
  2. Select Conditional Formatting, then Font color.
  3. Follow the screenshot to configure the formatting using the DAX measure that maps numeric status to color.
Screenshot of the conditional formatting configuration for a Unicode character in Power BI.
Power BI: Conditional Formatting for Unicode Character

The Table visualization is now fully formatted using both methods.

Screenshot of the formatted table visualization in Power BI.
Power BI: Formatted Table Visualization

Step 9: Create Card Visualization

Before creating the Card visualization, add a Slicer bound to PROJECT NAME and select a single project. This narrows the filter context so SELECTEDVALUE() returns exactly one STATUS NUMERIC value.

In Report view, add a Card visualization and include the MEASURE STATUS ICON field in the Fields.

NOTE: If both Card and Card (new) appear in the Visualizations pane, either option works with this technique.

The Unicode icon is displayed correctly, but it is not yet colorized. The next step applies the same color measure used in the Table visualization.

Screenshot of the unformatted card visualization in Power BI.
Power BI: Unformatted Card Visualization

Step 10: Conditional Formatting for Unicode Characters in Card Visualization Using DAX Measures

  1. Click the Card visualization and go to its Format visual options.
  2. Under Callout value, click the fx button for Color.
  3. Configure the options as shown below.
Screenshot of the card visualization data label color fx configuration in Power BI.
Power BI: Card Visualization Data Label Color fx

Results

The report now uses lightweight Unicode characters instead of custom visuals while still providing clear, color-coded status indicators across both Table and Card visualizations. While there are other ways to add custom icons to a report, using DAX measures to display Unicode character icons is a simple, lightweight approach with many customization options.

Screenshot of the final formatted report displaying the correctly colored Unicode icon (Green Status) in Power BI.
Power BI: Final Formatted Report (Green Status)
Screenshot of the final formatted report displaying the correctly colored Unicode icon (Red Status) in Power BI.
Power BI: Final Formatted Report (Red Status)

Troubleshooting

IssueCauseFix
Unicode character renders as a box or blank.Visual font likely does not include the glyph.Switch the visual’s font to Segoe UI.
Card shows blank instead of an icon.Filter context not narrowed to one row.Add a Slicer or Bookmark scoped to a single PROJECT NAME.
Common Issues

Summary

This technique works well when the icon set is small and stable, and when avoiding a custom visual’s dependency and performance overhead is a priority. It is also easy to maintain because both the displayed symbol and its color can be controlled centrally through DAX measures. For reports with more complex icon logic, many possible values, or icons that need to respond to hover or click events, a dedicated custom visual is likely a better fit.