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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.