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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Efsteps
Frequent Visitor

Make conditional formatting with text instead of color

Hi to everyone 

I need to make a card visual that shows me text based on a numeric or percentage value 

By example if the value is 1 in the card visual appear the text “We need to Improve” or if the value is 5 in the visual card, the text to show is “Great Job!” and if it’s possible at the same time the color text changes with the same conditions.

There’s a way to do it?

Thank you very much for reading!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Efsteps ,

 

Refer this measure.

Measure = IF(NOT(ISFILTERED('Table'[id])),"please select id",SWITCH(SELECTEDVALUE('Table'[value]),1,"We need to Improve",5,"Great Job!"))

Here's my sample data.

1.PNG

2.PNG

3.PNG

4.PNG

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Efsteps ,

 

Refer this measure.

Measure = IF(NOT(ISFILTERED('Table'[id])),"please select id",SWITCH(SELECTEDVALUE('Table'[value]),1,"We need to Improve",5,"Great Job!"))

Here's my sample data.

1.PNG

2.PNG

3.PNG

4.PNG

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Efsteps , You have create a formula that will return “We need to Improve” and others. Create a same formula, it should return color for that text so when formula returns “We need to Improve”, you return green

Example

color =
switch ( true(),
FIRSTNONBLANK(Table[commodity],"NA") ="commodity1" && sum(Table[Value]) >500,"lightgreen",
FIRSTNONBLANK(Table[commodity],"NA") ="commodity2" && sum(Table[Value]) >1000,"lightgreen",
/// Add more conditions
"red"
)

. In conditional formatting, you can choose field and a color measure post that

Refer for steps

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

 

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

How can be the formula taking apart the colors condition, just need to make a value  converted to text?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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