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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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

Anonymous
Not applicable

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
Anonymous
Not applicable

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.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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