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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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

 

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 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.

October NL Carousel

Fabric Community Update - October 2024

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