cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
wujunmin
Advocate I
Advocate I

Add Emoji to Conditional Formating Icon

How to Add Emoji to Conditional Formating Icon?

 

1. Get emoji

1) Get emoji by "Win+."

wujunmin_0-1651716618207.png

 

Then write a measure:

 
Emoji = IF([Rank]<=3,"😁","😟")
 wujunmin_1-1651716819482.png
2) Get emoji by UNICHAR: 
UNICHAR = IF([RANK]<=3,UNICHAR(128513),UNICHAR(128577))
wujunmin_2-1651717038833.png

Here is an unicode list: https://unicode-table.com/en/emoji/

wujunmin_3-1651717182186.png

 

2.  Combine values with emoji
 
wujunmin_4-1651717416653.png

Emoji couldn't be added to conditional formating icon directly, because an emoji is a text. 

So you need to convert emoji into an image. How? 

 

Wrap Emoji into SVG: 

 

Emoji_SVG=
"data&colon;image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48'>
<text x='24' y='26' text-anchor='middle' dominant-baseline='middle' font-size='40' fill='Tomato'>"
&IF([RANK]<=3,"😁","😟")&"
</text>
</svg>"
wujunmin_0-1651718777677.png

 

UNICHAR_SVG =
"data&colon;image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48'>
<text x='24' y='26' text-anchor='middle' dominant-baseline='middle' font-size='40'>"
&IF([RANK]<=3,UNICHAR(128513),UNICHAR(128577))&"
</text>
</svg>"
wujunmin_1-1651718810981.png

 

Then, add the SVG emoji measure to conditional formating icon, you could get the result. 
wujunmin_5-1651718082430.png

 

 


 

 

 

0 REPLIES 0

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors
Top Kudoed Authors