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

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

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

 

@v-yetao1-msft 
@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

 

 

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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