Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
alisoroush7
Frequent Visitor

using custom label

Hi

I created a dax and I write the below code in it:

CSI Emoji =
VAR AvgValue1 = CALCULATE(COUNT(Survey[A]),FILTER(Survey,Survey[A] >= 4)) / COUNT(Survey[A])
RETURN
    SWITCH(TRUE(),
        AvgValue1 >= 0.8, "😊",        
        AvgValue1 >= 0.4, "🤨",
        AvgValue1 >= 0, "🤬" 
    )
 
when i drop this dax to show the emojis as label of a line chart it changed numbers like in the below picture:
ergergegerg.jpg
how can i fix this?
3 REPLIES 3
mlsx4
Super User
Super User

Hi, 

Try to put your emoji by using UNICHAR(numb emoji)

You can check the unichar here (https://blog.iwco.co/2018/09/11/como-agregar-emojis-a-power-bi/)

 

CSI Emoji =
VAR AvgValue1 = CALCULATE(COUNT(Survey[A]),FILTER(Survey,Survey[A] >= 4)) / COUNT(Survey[A])
RETURN
    SWITCH(TRUE(),
        AvgValue1 >= 0.8, UNICHAR(128522),        
        AvgValue1 >= 0.4, UNICHAR(129320),
        AvgValue1 >= 0, UNICHAR (128545)
    )

 Something like this (check which is the emoji you want and replace the number inside)

i dit it but it still shows the number. does it related to font or anything else?

Okey, I understand... I don't think the font is the problem (If you change it nothing happens). But I'm afraid I can't help you this time. It will be interesting to see if someone could help.

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.