Forum Discussion
PowerBI Table - How to colour code cells based on values in the row
- Anonymous4 years ago
Hi SKPowerBINewbie ,
If you want to use conditonal formatting in table visual, there should be multiple columns M1/M2...M10 in table value field, you need to create color measures for each columns.
Here I create a sample to have a test.
You should need to create 10 color measures in total for each M column. Here I create a color measure for M1 as a sample.
Color for M1 = IF(SUM('Table (table visual)'[M1])> SUM('Table 2'[Colour Cell Red when Criteria > than ]),"Red","Green")We can drop down and select the columns we need to use conditional formatting in Format.
Here we select M1 and use [Color for M1] in Field value in Background color.
You can repeat the above operation to add conditional formatting for other M columns.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Rico Zhou ,
Thank you very much for taking the time to help me out .
Your proposed solution works but I have to use output the report into a matrix visual.
It will not fit in with my current design of a table matrix
Hi SKPowerBINewbie ,
If you want to use conditonal formatting in table visual, there should be multiple columns M1/M2...M10 in table value field, you need to create color measures for each columns.
Here I create a sample to have a test.
You should need to create 10 color measures in total for each M column. Here I create a color measure for M1 as a sample.
Color for M1 =
IF(SUM('Table (table visual)'[M1])> SUM('Table 2'[Colour Cell Red when Criteria > than ]),"Red","Green")
We can drop down and select the columns we need to use conditional formatting in Format.
Here we select M1 and use [Color for M1] in Field value in Background color.
You can repeat the above operation to add conditional formatting for other M columns.
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.
- SKPowerBINewbie4 years agoNew Member
Hi Rico Zhou ,
Yes, that worked . I ended up created a measure for each column and using conditional formatting . Thank you very much for your help and guidance.