Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have done basic conditional formatting before, but for some reason cannot get this one to work. I have this table (below).
The background color for cells in the Actual/Projected Obs column should be as follows:
Green if greater than 98% or less than or equal 100% of OSD GOAL
Yellow if greater than or equal 92% or less or equal 98% of OSD GOAL
Red if greater than or equal to 0% or less than 92% of OSD GOAL
So, the correct background colors should be:
Red
Red
Green
Yellow
Green
Green
Green
Green
Green
Green
Green
Green
and I get something completely different. Maybe because it is using SUM? But I don't see any other option. Please help!
I guess it is worth noting that I am on Version: 2.72.5556.701 32-bit (August 2019) of Power BI.
Solved! Go to Solution.
@Anonymous , Create a color measure and use that in conditional formatting with field value option
Switch(true(),
[OSD GOAL] >=.98 , "green", // use 98 if this not a % column
[OSD GOAL] >=.92 , "yellow",// use 92 if this not a % column
[OSD GOAL] >=0 , "red"
)
refer video or links for steps
https://www.youtube.com/watch?v=RqBb5eBf_I4
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
I have a table into a report with applied conditional formatting
There is few field with project dosuments count and we want to apply conditional formatting based on numbers count like if documents is > 0 then icon Green and if documents count is <= 0 then Red icon but additionally we want to add one more condition that where "Specific" project documents count is 0 or more than 0 but in any case "specific" project icon should be Green.
@Anonymous , Create a color measure and use that in conditional formatting with field value option
Switch(true(),
[OSD GOAL] >=.98 , "green", // use 98 if this not a % column
[OSD GOAL] >=.92 , "yellow",// use 92 if this not a % column
[OSD GOAL] >=0 , "red"
)
refer video or links for steps
https://www.youtube.com/watch?v=RqBb5eBf_I4
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
@amitchandak In your example you are just using [OSD GOAL], my measure would not allow me to use it like that. However, it allowed to use MAX. Could that be the problem?
Hi @Anonymous
In your data, all values from the [OSD GOAL] column are greater than .98 (the smallest one in image is 48039), so all the fields are green. This is a correct behavior. You need to put a measure whose result is percentage values between 0 and 1 to make this color measure work as you expected.
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.
@amitchandak , thank you very much for your reply! I watched the video and created the measure. However, now all the fileds are green. What am I doing wrong?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |