Using Images in Power BI – Slicers/Axis/Conditional Formatting

  • Published
  • Posted in Power BI
  • Updated
  • 2 mins read
  • Tagged as

I will put the scenario straight forward, you want to use the images/icons in axis of visualizations or use custom conditional formatting to indicate the fields in the visuals based on some criteria or use them in slicers to filter the data, then you have come to right spot to learn it and enhance the reports.

Let us understand two DAX functions UNICHAR and UNICODE in Power BI.

UNICHAR FUNCTION:

Returns the Unicode character/symbol referenced by the numeric value.

Syntax: UNICHAR(number)
Parameter: The Unicode number that represents the character.
Example: UNICHAR(128178)returns the character/symbol  below

UNICODE FUNCTION:

Returns the number (code point) corresponding to the first character of the text.

Syntax: UNICODE( <Text> )
Parameter: Text is the character for which you want the Unicode value.
Example: UNICODE(“A”) returns the number 65

Inference: From the above examples we can see that, UNICHAR and UNICODE are complementary to each other, that is UNICODE number is the parameter for UNICHAR and vice-versa.

Scenario: Let us consider an example, ABCD company is a customer service company which operates in multiple mediums (chat/email/phone).

Consider the sample dataset as below and these two tables have relationship on MediumId and MediumType.

After importing the data into the Power BI desktop, add a calculated column in dimension table that as below.

Make a relationship between two tables on MediumId and MediumType. Now time to create the visuals to use icons/images.

Choose a clustered column chart from visualizations pane, drag Icon column in axis well and Requests’ column as sum in values well, you will find the visual like below.

Similarly, use the Unichar and Unicode DAX functions wherever needed and achieve the use of these icons in slicer for filtering also as custom conditional formatting in visuals by writing the measures.

Pro Tip: The use of icons in conditional formatting (without colour differentiation) helps the colour-blind users to consume the data easier. Example below where colour-blind users might face difficulty in identifying the differentiation of red, green but it is easier in seeing the icons.

Thank you.

Srikanth K,
Data Analyst
Addend Analytics

Addend Analytics is a Microsoft Gold Partner based in Mumbai, India, and a branch office in the U.S.

Addend has successfully implemented 100+ Microsoft Power BI and Business Central projects for 100+ clients across sectors like Financial Services, Banking, Insurance, Retail, Sales, Manufacturing, Real estate, Logistics, and Healthcare in countries like the US, Europe, Switzerland, and Australia.

Get a free consultation now by emailing us or contacting us.