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
DataNinja777
Super User
Super User

Changing colors based on rules within ConcatenateX

Hi Power BI experts,

 

Please could you let me know if there's a function in Power BI where I can change colors within ConcatenateX generated text outputs.  For example, my task involves writing variance analysis of numbers and why the balance increased X amount and decreased by Y amount, etc.  I'd like to automate this task as much as possible, by using ConcatenateX and searching into journal entry text descriptions for the details of the movements, but how can I change the color of the monetary value where the increase in number is shown in blue color and decrease in number is in red color within the same text ouput generated from ConcatenateX?  Is there a technique to change color within the text output?  I am currently doing this manually in excel, and it is quite tedious to change colors manually.  

 

Thank you for your insight and knowledge.  

1 ACCEPTED SOLUTION

Hi, @DataNinja777  again I am afraid that with excel there is no solution as well.
Please refer to the linked discussion :

https://answers.microsoft.com/en-us/msoffice/forum/all/excels-conditional-formatting-to-only-part-of...

it is also in the Excel community so you can try to post your question with the example there too...

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

6 REPLIES 6
Ritaf1983
Super User
Super User

Hi @DataNinja777 
Can you please show the desired output?

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi @Ritaf1983 

 

Thanks for looking into this request. I am looking for a systematic way to color the concatanateX generated text variance analysis based on the negative or positive of the oringal numbers within the concatenateX constructed scentence.  I am writing it manually at the moment, but I believe, this is kind of possible using ConcatenateX with combination of RankX function, but coloring part, I am not sure, if it can be done.  

DataNinja777_0-1699769976264.png

Thanks!

Hi @DataNinja777 

Unfortunately, there is no option to achieve it directly.
I use a kind of embedded cards as a workaround to achieve this effect.
You can take a look at the linked discussion for more details :

https://community.fabric.microsoft.com/t5/Desktop/Color-change-for-specific-text-in-card-visual/m-p/...

There is an idea about a similar issue you can vote for / post a new one with more details:

https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=fcbcba13-0abd-ed11-9ac5-501ac50aaf16

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thanks for your idea @Ritaf1983 . I'd appreciate it if anyone could let me know how I can achive this in Excel, and if there is a technique which can take care of this task for me in Excel.  

Hi, @DataNinja777  again I am afraid that with excel there is no solution as well.
Please refer to the linked discussion :

https://answers.microsoft.com/en-us/msoffice/forum/all/excels-conditional-formatting-to-only-part-of...

it is also in the Excel community so you can try to post your question with the example there too...

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thanks for your input @Ritaf1983 .

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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