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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply

Custom Color for Text Box with Multiple Text

Hi,

 

I have to show in a card the values-

Promotion, High Performer, Progressing, Low Performer, Watch.

But I have to give Green color to first 2, then orange to progressing & Low performer, Red to Watch.

 

Table name HC Report, Column name- Overall Talent Rating

 

How it can be done, any help appreciated.

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @akashpadmakumar 

One quick example,

Create the measure:

Text Format =
VAR theIndicator =
    SELECTEDVALUE ( 'Table'[Overall Talent Rating] )
RETURN
    SWITCH (
        TRUE (),
        theIndicator = "Promotion"
            || theIndicator = "High Performer", "Green",
        theIndicator = "Progressing"
            || theIndicator = "Low Performer", "Orange",
        theIndicator = "Watch", "Red"
    )

Then,

v-xiaotang_0-1622093644638.png

v-xiaotang_1-1622093644640.png

 

Result:

v-xiaotang_2-1622093644643.png

 

v-xiaotang_3-1622093644644.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

7 REPLIES 7
v-xiaotang
Community Support
Community Support

Hi @akashpadmakumar 

One quick example,

Create the measure:

Text Format =
VAR theIndicator =
    SELECTEDVALUE ( 'Table'[Overall Talent Rating] )
RETURN
    SWITCH (
        TRUE (),
        theIndicator = "Promotion"
            || theIndicator = "High Performer", "Green",
        theIndicator = "Progressing"
            || theIndicator = "Low Performer", "Orange",
        theIndicator = "Watch", "Red"
    )

Then,

v-xiaotang_0-1622093644638.png

v-xiaotang_1-1622093644640.png

 

Result:

v-xiaotang_2-1622093644643.png

 

v-xiaotang_3-1622093644644.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.

MintuBaruah
Helper III
Helper III

Hello @akashpadmakumar 

 

You can set the background color of the card visual of those values according to your needs manually or if required dynamically(conditional formatting) too(by selecting the "fx" icon).

 

If you find the solution useful please mark my post as a solution!
In doing so, you are also helping me. Thank you!

Mintu Baruah

Yes that is my question, How Can I give random colors to Text, I can see only nunbers in the conditional formatting you have mentioned

Hello @akashpadmakumar 

 

If you have selected a title then you can change the color there(refer to screenshot 1)

ComAns3_1.JPG

And if you have selected a category then you can change the color there(refer to screenshot 2)

ComAns3_2.JPG

 

If you find the solution useful please mark my post as a solution!
In doing so, you are also helping me. Thank you!

Mintu Baruah

You got me all wrong brother,

 

What I meant to say is, I have a column with a set of text values in excel file,

When a particular tex comes I want it to be in a particular color.

The column I mentioned here "Overall Talent Rating" has 5 values only,
Promotion, High Performer,Progressing, Low Performer, Watch

I want to show in the card for any text coming in the card,
Promotion & High Performer in Green Color (Text Color)
Progressing & Low Performer in Orange

And Watch in Red

 

So when ever the text comes, the color of the text is in accordance to what I have mentioned,

This is possible by creating a measure with switch statement and bracket every string to a number and then applying the number the colors, but I am confused is the switch statment for the measure

amitchandak
Super User
Super User

@akashpadmakumar , You can color the title of text dynamically. Can give example of what you are trying to achieve

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

The column I mentioned here "Overall Talent Rating" has 5 values only,
Promotion, High Performer,Progressing, Low Performer, Watch

I want to show in the card for any text coming in the card,
Promotion & High Performer in Green Color (Text Color)
Progressing & Low Performer in Orange

And Watch in Red

 

Basically the text shown the card should be this color

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.