Forum Discussion
tracyhopaulson
5 years agoResolver I
conditional formatting
Hello, I need to set conditional format to show 3 different colors as shown below in a small sample data but cannot figure out how to do it in Power BI. Can someone please help? Thanks in advance f...
- 5 years ago
tracyhopaulson, try this measure:
Formatting Color = SWITCH ( TRUE (), [Counted] = 0 && [Not Counted] > 0, "Red", [Counted] > 0 && [Not Counted] = 0, "Green", [Counted] > 0 && [Not Counted] > 0, "Yellow" )Steps to apply:
1. Conditional formatting > Background color
2. Format by = Field value
3. Based on field = Formatting Color
Instead of the color names, you can use color codes (e.g., #FF0000).
DataInsights
5 years agoSuper User
tracyhopaulson, try this measure:
Formatting Color =
SWITCH (
TRUE (),
[Counted] = 0
&& [Not Counted] > 0, "Red",
[Counted] > 0
&& [Not Counted] = 0, "Green",
[Counted] > 0
&& [Not Counted] > 0, "Yellow"
)
Steps to apply:
1. Conditional formatting > Background color
2. Format by = Field value
3. Based on field = Formatting Color
Instead of the color names, you can use color codes (e.g., #FF0000).
tracyhopaulson
5 years agoResolver I
Thank you so much! This works 🙂