Forum Discussion
How to format multiple text columns
- Anonymous3 years ago
Hi SelflearningBi ,
Because each of your column names is different, Power BI Desktop can't make it easier to implement your needs.
The current system does not support this function. You can post your idea to Ideas .
https://ideas.powerbi.com/ideas/
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi SelflearningBi ,
According to your description, you want to set the background color according to yes and no,right? Here are my steps you can follow as a solution.
(1)This is my test data.
(2)We can create measures.
_OD1= var _od1 =SELECTEDVALUE('Table'[OD1])
return
IF( _od1 = "YES" , "green" ,"red")
_OD2= var _od2 =SELECTEDVALUE('Table'[OD2])
return
IF( _od2 = "YES" , "green" ,"red")
_OD3= var _od3 =SELECTEDVALUE('Table'[OD3])
return
IF( _od3 = "YES" , "green" ,"red")_OD4= var _od4 =SELECTEDVALUE('Table'[OD4])
return
IF( _od4 = "YES" , "green" ,"red")_OD5= var _od5 =SELECTEDVALUE('Table'[OD5])
return
IF( _od5 = "YES" , "green" ,"red")
(3) Set the background color for the OD1-OD5 columns in turn as shown in the following figure.
(4) Then the result is as follows.
For more information you can refer to this document Apply conditional table formatting in Power BI - Power BI | Microsoft Learn .
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- SelflearningBi3 years agoHelper III
Anonymous
Hi, Thank you for helping me, This is a good way to do the formating;however, I was wondering is ther any method we are not required to create multip similar measures to achieve this formating?- Anonymous3 years agoNot applicable
Hi SelflearningBi ,
Because each of your column names is different, Power BI Desktop can't make it easier to implement your needs.
The current system does not support this function. You can post your idea to Ideas .
https://ideas.powerbi.com/ideas/
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- SelflearningBi3 years agoHelper III
Thank for answing