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
ModernHand
Frequent Visitor

Dax color coding

Hello,

 

need help with custom colors on 1 column!

 

So the column is text based, all I need is 1 word inside text to be RED, everything else in cell must be black.

 

 

textcolumn = 

VAR  NEFAKT = (CURRENCY(Zmaje[Vrednost]) - CURRENCY(Zmaje[koncnavrednost]))
RETURN
FORMAT(Zmaje[Vrednost], "##,#0.00 € ") & (" Nefakt "& (FORMAT(NEFAKT, "##,#0.00 €")))

 

 

 

I need this to be RED

 

 

(FORMAT(NEFAKT, "##,#0.00 €")))

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ModernHand ,

 

According to your statement, I know that you want to custom color of your value based on specific words.

I think you can try to create a measure.

Measure = IF(CONTAINSSTRINGEXACT(MAX('Table'[Text]),"b"),"Red","Black")

Then use conditional formatting in table or matrix to change the font color.

RicoZhou_0-1663923827749.png

For reference: Apply conditional table formatting in Power BI - Power BI | Microsoft Learn

 

Best Regards,
Rico Zhou

 

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

1 REPLY 1
Anonymous
Not applicable

Hi @ModernHand ,

 

According to your statement, I know that you want to custom color of your value based on specific words.

I think you can try to create a measure.

Measure = IF(CONTAINSSTRINGEXACT(MAX('Table'[Text]),"b"),"Red","Black")

Then use conditional formatting in table or matrix to change the font color.

RicoZhou_0-1663923827749.png

For reference: Apply conditional table formatting in Power BI - Power BI | Microsoft Learn

 

Best Regards,
Rico Zhou

 

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

 

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.