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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Replace the Column Values with UNICHAR CODE Colors

Hello All,

 

Displaying the Status of a some Columns in a matrix table and want to replace it with UNIHCAR code

Capture2.PNG
As you can see above I am having the status such as Completed, In Progress, Blocked .
But I want to display status of the columns with colors using below UNICHAR code as below

Capture1.PNG

Unichar Code for Green :  UNICHAR("128994")

Unichar Code for Yellow:  UNICHAR("128993")

Unichar Code for Red:  UNICHAR("128308") 

Can any one please help me how can I make it

 

@Anonymous 
@selimovd 
@Jihwan_Kim 

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @Anonymous 

As far as I know, in Power BI if you want to replace specific value with Unichar code colors, it’s unrealistic to avoid  creating measures.

Even through conditional formatting using Icons in Power BI,

FYI: https://exceleratorbi.com.au/conditional-formatting-using-icons-in-power-bi/

-

Besides, you said “When I use the below expression in calulated column its' working fine but not for measure.”emmm, try this:

 

AM = 
var  _attri=SELECTEDVALUE(Products[Attribute])
var  _product=SELECTEDVALUE(Products[Value])
return 
IF(_attri = "AM"&&_product = "Completed",UNICHAR("128994"),IF( _attri = "AM"&& _product = "In-Progress",UNICHAR("128993") ,IF(_attri = "AM"&& _product = "Blocked",UNICHAR("128308"),BLANK())))

 

Result:

v-xiaotang_0-1622709752825.png

 

See sample file attached below.

 

Best Regards,

Community Support Team _ Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-xiaotang
Community Support
Community Support

Hi @Anonymous 

As far as I know, in Power BI if you want to replace specific value with Unichar code colors, it’s unrealistic to avoid  creating measures.

Even through conditional formatting using Icons in Power BI,

FYI: https://exceleratorbi.com.au/conditional-formatting-using-icons-in-power-bi/

-

Besides, you said “When I use the below expression in calulated column its' working fine but not for measure.”emmm, try this:

 

AM = 
var  _attri=SELECTEDVALUE(Products[Attribute])
var  _product=SELECTEDVALUE(Products[Value])
return 
IF(_attri = "AM"&&_product = "Completed",UNICHAR("128994"),IF( _attri = "AM"&& _product = "In-Progress",UNICHAR("128993") ,IF(_attri = "AM"&& _product = "Blocked",UNICHAR("128308"),BLANK())))

 

Result:

v-xiaotang_0-1622709752825.png

 

See sample file attached below.

 

Best Regards,

Community Support Team _ Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , You have to create color and unichar measures like

 

 

Arrow =
SWITCH (
TRUE(),
Max(status) ="Completed" ,UNICHAR(128994),
Max(status) = ""In Progress, UNICHAR(128993),
Max(status) = ""Blocked, UNICHAR(128308)
)


/////Arrow Color
Arrow color =
SWITCH (
TRUE(),
Max(status) ="Completed" ,"Green",
Max(status) = ""In Progress, "Yellow",
Max(status) = ""Blocked, "red"
)

Use arrow a measure/values and use color in conditional formatting

 

for more details

https://exceleratorbi.com.au/dax-unichar-function-power-bi/

https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting
https://youtu.be/M5PvQUy-L_4?t=531

 

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Amit,


When I use the below expression in calulated column its' working fine but not for measure.
AM = SWITCH(TRUE(), 'Products'[Attribute] ="AM " && 'Products'[Value] = "Completed" ,UNICHAR("128994") , 'Products'[Attribute] ="AM " && 'Products'[Value] = "In-Progress" ,UNICHAR("128993") , 'Products'[Attribute] ="AM " && 'Products'[Value] = "Blocked" ,UNICHAR("128308")  )

 

And my client don't want more columns or measures as mine is banking project and there are hundrends of columns .
He just want to replace the value with color

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!