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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ErrorPL
Frequent Visitor

Replacing number for Name, but keeping Conditional Formating of table

Hi,

For past 2Hour I am struggling with finding a solution for my case.

Basically, I want a table with two columns, Expected bin code and ST Status, but I want to replace numbers in cells with text corresponding to it (2 - Done, 1 - Not Done), but a twist is that I want to keep my custom column colour. So all [Done - 2] cells will be green and [Not Done - 1] to be red. Dream table represents what I want to achieve. My data set represents a table I have (and Name is pulled via a relationship with a table named Text for Number). From my understanding, I am not able to use conditional formatting in a way I want, but maybe there is a way or other method. I will be really glad for the help.

TablePowerBI.PNGTable dream.PNGNumber of Name.PNG

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @ErrorPL,

 

As you said it's not possible to conditional formatting with text only with number why dont you try to do it with a UNICHAR coding:

 

Done = SWITCH ( TRUE (), Table1[VALID] = "OK", UNICHAR ( 10004 ), UNICHAR ( 10060 ) )

This will give you the following result:

uni.png

 

Get more Unicode from unicode list.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hi @ErrorPL,

 

As you said it's not possible to conditional formatting with text only with number why dont you try to do it with a UNICHAR coding:

 

Done = SWITCH ( TRUE (), Table1[VALID] = "OK", UNICHAR ( 10004 ), UNICHAR ( 10060 ) )

This will give you the following result:

uni.png

 

Get more Unicode from unicode list.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @MFelix,

Thanks for your suggestion. I had a look, and it is okey, but not perfect.

 

Do you know if it would be possible to hide number and just leave a cell coloured? I tried in text formatting, but the problem is I can hide one type ( by colouring text to the exact colour of cell), but then other is visible. If this will be possible instead of replacing a number I will be happy with it.

Thank you!

Hi @ErrorPL,

 

I have to say the answer is NO. Currently the Conditional Formatting is not available for TEXT values. Also except Conditional Formatting feature, there is no OOTB feature to highlight cell color conditionally.

 

You can vote on this same idea: can we do conditional formatting for the text type column in a table?.

 

Best Regards,
QiuyunYu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.

Top Solution Authors