Forum Discussion
Conditional Formatting one column based on another
- 5 years ago
Hi Anonymous
If you cannot do this, you need to use visual Table and then write 3 measures (separate for each category) that will return the color code.
CC Category A = IF(SELECTEDVALUE('Table (3)'[Category A]) >= SELECTEDVALUE('Table (3)'[CutOff]), "#0f0","#f00") CC Category B = IF(SELECTEDVALUE('Table (3)'[Category B]) >= SELECTEDVALUE('Table (3)'[CutOff]), "#0f0","#f00") CC Category C = IF(SELECTEDVALUE('Table (3)'[Category C]) >= SELECTEDVALUE('Table (3)'[CutOff]), "#0f0","#f00")Then for each column separately (Cat A, B, C) set the background color from conditional formatting section. Select the Field Value from the list, and then select the appropriate measure.
_______________
If I helped, please accept the solution and give kudos! 😀
lkalawski thanks for the quick reply.
While this does seem to get the end result I want, it changes my data structure, which is something I don't want to do. I prefer to not unpivot category as I use it for other things. So I'm guessing there's no way to do this without changing how my data is organized?
Hi Anonymous
If you cannot do this, you need to use visual Table and then write 3 measures (separate for each category) that will return the color code.
CC Category A =
IF(SELECTEDVALUE('Table (3)'[Category A]) >= SELECTEDVALUE('Table (3)'[CutOff]), "#0f0","#f00")
CC Category B =
IF(SELECTEDVALUE('Table (3)'[Category B]) >= SELECTEDVALUE('Table (3)'[CutOff]), "#0f0","#f00")
CC Category C =
IF(SELECTEDVALUE('Table (3)'[Category C]) >= SELECTEDVALUE('Table (3)'[CutOff]), "#0f0","#f00")
Then for each column separately (Cat A, B, C) set the background color from conditional formatting section. Select the Field Value from the list, and then select the appropriate measure.
_______________
If I helped, please accept the solution and give kudos! 😀
- Anonymous5 years agoNot applicable
lkalawski OK, that worked, thanks!
Although that's a ridiculous amount of work for something supposedly simple. Microsoft really need to add simple features like this.