UNICHAR

How to Use the Power BI DAX function UNICHAR

What is UNICHAR?

UNICHAR is a DAX function that returns the Unicode character that corresponds to the specified numeric value. Unicode is a standard for encoding characters that’s used by many different computer systems and software programs. Using UNICHAR, you can convert numeric values to their corresponding Unicode characters, which can be useful for displaying special characters and symbols in your Power BI reports.

Using UNICHAR in Power BI

To use the UNICHAR function in Power BI, you’ll need to create a new measure or calculated column in your data model. Here’s how to do it:

1. Open your Power BI report and navigate to the “Data” view.

2. Select the table that contains the column you want to convert to Unicode.

3. Click the “New Measure” button in the “Modeling” tab of the ribbon.

4. In the formula bar, enter the following formula:


UNICHAR(Table[Column])


Replace "Table" with the name of your table and "Column" with the name of the column you want to convert.

5. Give your new measure a name and press Enter to create it.

Once you've created your UNICHAR measure, you can use it in your Power BI visuals just like any other measure. For example, you could use it in a table or matrix to display special symbols or characters.

Examples of Using UNICHAR

Here are a few examples of how you can use the UNICHAR function in your Power BI reports:

1. Displaying checkmarks and X's

You can use UNICHAR to display checkmarks and X's in your table or matrix visuals. Here's how:

1. Create a new measure with the following formula:


Checkmark = UNICHAR(10003)


2. Create another new measure with this formula:


X = UNICHAR(10007)


3. Add these measures to your table or matrix visual, and use them to display checkmarks and X's based on certain conditions in your data.

2. Displaying custom icons

You can also use UNICHAR to display custom icons in your Power BI reports. Here's how:

1. Find the Unicode value for the icon you want to display. A good resource for finding Unicode values is [unicode-table.com](https://unicode-table.com/en/).

2. Create a new measure with the following formula:


Icon = UNICHAR(UnicodeValue)


3. Replace "UnicodeValue" with the actual Unicode value for the icon you want to display.

4. Add the "Icon" measure to your visual, and format it as needed.

3. Displaying special characters

Finally, you can use UNICHAR to display special characters in your Power BI reports. For example, you might want to display the copyright symbol (©) in your report. Here's how:

1. Find the Unicode value for the symbol you want to display. For the copyright symbol, the Unicode value is 169.

2. Create a new measure with the following formula:


Copyright = UNICHAR(169)


3. Add the "Copyright" measure to your visual, and format it as needed.

UNICHAR is a powerful DAX function that can help you display special symbols and characters in your Power BI reports. By following the steps outlined in this article, you can start using UNICHAR to enhance the visual appeal and functionality of your reports.

Power BI DAX Training Courses by G Com Solutions (0800 998 9248)

Upcoming Courses

Contact Us

    Subject

    Your Name (required)

    Company/Organisation

    Email (required)

    Telephone

    Training Course(s)

    Your Message

    Upload Example Document(s) (Zip multiple files)