Reply
Dandanpy
Frequent Visitor

Different colors in a text string

calendar.PNGcell.PNG

Is it possible to obtain two different colors, or at least change one of them in a concatenated text string?

For example: Days and %KM =

VAR vDIA = SELECTEDVALUE('Calendario'[Día])

VAR KM_RECORRIDO = DIVIDE([KM TOTAL], CALCULATE([KM TOTAL], ALL('KM_MARZO_2024')), 0)

VAR KM_RECORRIDO_PCT = FORMAT(KM_RECORRIDO, "Percent")

RETURN vDIA & UNICHAR(10) & KM_RECORRIDO_PCT

vDIA in one color KM_RECORRIDO_PCT in another color

2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

Instead of showing the text you can show an SVG image.  There you can play with colors.

View solution in original post

v-zhouwen-msft
Community Support
Community Support

Hi @lbendlin ,thanks for the quick reply.

Hi @Dandanpy ,

Regarding your question, after my attempts, Power BI is not able to fulfill your needs for the time being, because the formatting settings take effect for the whole measure.

vzhouwenmsft_0-1712731262765.png

Perhaps you can split your measure into two separate measure.

vzhouwenmsft_1-1712731350735.png

Apply conditional table formatting in Power BI - Power BI | Microsoft Learn

Best Regards,
Wenbin 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

2 REPLIES 2
v-zhouwen-msft
Community Support
Community Support

Hi @lbendlin ,thanks for the quick reply.

Hi @Dandanpy ,

Regarding your question, after my attempts, Power BI is not able to fulfill your needs for the time being, because the formatting settings take effect for the whole measure.

vzhouwenmsft_0-1712731262765.png

Perhaps you can split your measure into two separate measure.

vzhouwenmsft_1-1712731350735.png

Apply conditional table formatting in Power BI - Power BI | Microsoft Learn

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

lbendlin
Super User
Super User

Instead of showing the text you can show an SVG image.  There you can play with colors.

avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)