Forum Discussion
Akbera1
1 year agoHelper I
Condition formatting
Hey All, i want condition formatting on more then 1 condition. if type A is above 10 then or below 10% is red and type B is above 5% green and below is red. like: Materials Type V...
- 1 year ago
Hi Akbera1
Can you please try this ?
Create a measure and use conditional formatting.ValueColor =SWITCH(TRUE(),MAX('Table'[Type]) = "A" && MAX('Table'[Values]) < 0.10, "#FF0000", -- RedMAX('Table'[Type]) = "A" && MAX('Table'[Values]) >= 0.10, "#00FF00", -- GreenMAX('Table'[Type]) = "B" && MAX('Table'[Values]) < 0.05, "#FF0000", -- RedMAX('Table'[Type]) = "B" && MAX('Table'[Values]) >= 0.05, "#00FF00", -- GreenBLANK())
If this answers your questions, kindly accept it as a solution and give kudos.
wardy912
1 year agoSuper User
Hi Akbera1
Add the following calculated column
ColorFormat =
SWITCH(
TRUE(),
'Table'[Type] = "A" && ('Table'[Values] > 0.10 || 'Table'[Values] < 0.10), "Red",
'Table'[Type] = "B" && 'Table'[Values] > 0.05, "Green",
'Table'[Type] = "B" && 'Table'[Values] < 0.05, "Red",
BLANK()
)
Ensure the column is in decimal format.
Go to your table visual.
Click the dropdown on the Values column > Conditional formatting > Font color or Background color.
Choose Format by: Field value.
Select the ColorFormat column you just created.
Please give a thumbs up and mark as solved if this helps, thanks!