cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Post Prodigy

## UNICHAR WITH NO VALUEundefined

Hi,

I use unichar to show the values with icons. When there is no value, i see the icon "(BLANK" which i don't like. I tried different things but it didn't work. Here is my measure:

Arrow_K =
VAR down = UNICHAR(9660)
VAR slightdown = UNICHAR(9660)
var slightup = UNICHAR(9650)
VAR up = UNICHAR(9650)
VAR same = UNICHAR(9866)

VAR DIF = [AVE] - [Previous]
RETURN
SWITCH(TRUE(),
DIF<=-0.01, up,
DIF > 0.01, down, "-")

If i would not use switch, i know how to do it such as:
measureworks =
VAR calc=
calculate(SUM......)
Return
If(ISBLANK(calc), "N/A", calc)

However i could not succeed with it, when i use switch. can you help me on this?
1 ACCEPTED SOLUTION
Super User
Arrow =
VAR down = UNICHAR(9660)
VAR up = UNICHAR(9650)

VAR DIF = [SumPred] - [SumQty]
RETURN
SWITCH(TRUE(),
ISBLANK(DIF), "",
DIF<=-0.3, up,
DIF > -0.3, down,  "-")

Try this measure.

Regards,

Luca D'Elicio
5 REPLIES 5
Super User

Hi,

can you upload a the pbix on https://wetransfer.com/

Luca D'Elicio

Luca D'Elicio
Post Prodigy

Hi,

I made a simple pbix file. If there is no value, the arrow should be "n/a" or should not show down or up. This selection doesn't have value, which i showed with the card. However, the arrow is down. The file is loaded here. thanks in advance. https://we.tl/t-uCXGWX8Mcn

Super User
Arrow =
VAR down = UNICHAR(9660)
VAR up = UNICHAR(9650)

VAR DIF = [SumPred] - [SumQty]
RETURN
SWITCH(TRUE(),
ISBLANK(DIF), "",
DIF<=-0.3, up,
DIF > -0.3, down,  "-")

Try this measure.

Regards,

Luca D'Elicio
Post Prodigy

Wonderful! it is working, thank youuu.

Super User

So easy!
With PowerBi you have to use Logic and Fantasy!
Have a nice day,

Luca D'Elicio

Announcements

#### Fabric certifications survey

Certification feedback opportunity for the community.

#### Power BI Monthly Update - April 2024

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

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors