Forum Discussion
Create a colour visual rule
- Anonymous2 years ago
Hi LockMary
Please try this:
First of all, I create a set of sample data:
Then add a measure:
Color = VAR _currentColumn1 = SELECTEDVALUE ( Data[Column1] ) VAR _currentColumn2 = SELECTEDVALUE ( Data[Column2] ) VAR _currentColumn3 = SELECTEDVALUE ( Data[Column3] ) RETURN IF ( _currentColumn1 = "Yes" && _currentColumn2 = "Yes" && _currentColumn3 = "Yes", "Green", IF ( _currentColumn1 = "No" && _currentColumn2 = "No" && _currentColumn3 = "No", "Red", "Yellow" ) )Then add a table visual and right click the field, select the conditional formatting > font color
Select Field value from the Format style, and choose the color measure in the next checkbox.
The result is as follow:
Best Regards,
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi LockMary
Please try this:
First of all, I create a set of sample data:
Then add a measure:
Color =
VAR _currentColumn1 =
SELECTEDVALUE ( Data[Column1] )
VAR _currentColumn2 =
SELECTEDVALUE ( Data[Column2] )
VAR _currentColumn3 =
SELECTEDVALUE ( Data[Column3] )
RETURN
IF (
_currentColumn1 = "Yes"
&& _currentColumn2 = "Yes"
&& _currentColumn3 = "Yes",
"Green",
IF (
_currentColumn1 = "No"
&& _currentColumn2 = "No"
&& _currentColumn3 = "No",
"Red",
"Yellow"
)
)
Then add a table visual and right click the field, select the conditional formatting > font color
Select Field value from the Format style, and choose the color measure in the next checkbox.
The result is as follow:
Best Regards,
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.