Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Is it possible to show the result with unichar in a single measurement?
I tried this:
but the result was this:
however I need the value in percentage: -9,42% and unichar code
Solved! Go to Solution.
Glad to hear you've solved the main issue.
The latest problem looks to be due to blank values of x falling into the 2nd branch of IF.
I suggest adjusting your measure to return a blank result when x is blank.
Here is how you could write it:
Variação Média CNE180 =
VAR vVariacao = [m_CNE180] - [6M CNE180]
VAR x =
DIVIDE ( vVariacao, [6M CNE180], 0 )
RETURN
IF (
NOT ISBLANK ( x ),
IF (
x < 0,
FORMAT ( x, "0.00%" ) & UNICHAR ( 9989 ),
FORMAT ( x, "0.00%" ) & UNICHAR ( 10060 )
)
)
An alternative you may want to look at is to leave your measure as this:
Variação Média CNE180 =
VAR vVariacao = [m_CNE180] - [6M CNE180]
VAR x =
DIVIDE ( vVariacao, [6M CNE180], 0 )
RETURN
x
but give it this custom format string:
0.00%\❌;0.00%\✅;0.00%\❌
See here:
Does one of the above methods work for you?
Hi @yforti
You can use the FORMAT function to return a value with a specific number format as text.
In this case, you could change the final expression to
FORMAT ( x, "0.00%" ) & UNICHAR ( 10004 )
I would also suggest considering leaving the measure as a number, but using a format string to control the formatting (possibly a dynamic format string).
For example, a simple format string for negative values could be:
"0.00%\✔"
Here's a good article on this subject:
https://www.sqlbi.com/articles/improving-data-labels-with-format-strings/
Regards
Thnks man! It worked!
The only problem is:
before with the measurement as shown in the photo, it only brought the relevant values->
, now with the change in measurement, it is bringing values to all lines->
Can u help me?
Glad to hear you've solved the main issue.
The latest problem looks to be due to blank values of x falling into the 2nd branch of IF.
I suggest adjusting your measure to return a blank result when x is blank.
Here is how you could write it:
Variação Média CNE180 =
VAR vVariacao = [m_CNE180] - [6M CNE180]
VAR x =
DIVIDE ( vVariacao, [6M CNE180], 0 )
RETURN
IF (
NOT ISBLANK ( x ),
IF (
x < 0,
FORMAT ( x, "0.00%" ) & UNICHAR ( 9989 ),
FORMAT ( x, "0.00%" ) & UNICHAR ( 10060 )
)
)
An alternative you may want to look at is to leave your measure as this:
Variação Média CNE180 =
VAR vVariacao = [m_CNE180] - [6M CNE180]
VAR x =
DIVIDE ( vVariacao, [6M CNE180], 0 )
RETURN
x
but give it this custom format string:
0.00%\❌;0.00%\✅;0.00%\❌
See here:
Does one of the above methods work for you?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.