The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have a KPI that has a target.
The colors desired are as follows:
1. If it's above 80%, it's green.
2. If it's below 80% is red.
3. If there's no data for the month and it displays "Blank" I'd like that as either green or grey.
I have issues with point 3. I can't find a way to turn this "Blank" into another color.
Any ideas?
I tried to modify the Bad Value color with a function but it still shows in red.
Solved! Go to Solution.
Hi, @WorkHard
According to your description and sample picture, you want to set the KPI card to grey if the value is blank and you can not find the option. I think you achieve this using “Field value” in the conditional format, can follow my steps:
Color =
var _percent=
DIVIDE(MAX('Table'[Amount]),MAX('Table'[Goal]))
return
SWITCH(
TRUE(),
MAX('Table'[Amount])=BLANK(),"Grey",
_percent>0.8,"Green",
_percent<=0.8,"Red"
)
You can download my test pbix file here
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @WorkHard
According to your description and sample picture, you want to set the KPI card to grey if the value is blank and you can not find the option. I think you achieve this using “Field value” in the conditional format, can follow my steps:
Color =
var _percent=
DIVIDE(MAX('Table'[Amount]),MAX('Table'[Goal]))
return
SWITCH(
TRUE(),
MAX('Table'[Amount])=BLANK(),"Grey",
_percent>0.8,"Green",
_percent<=0.8,"Red"
)
You can download my test pbix file here
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I would also recommend for you to set the rule to be "less than or equal to" and try adding to your measure AVG a "+0" in the end to avoid showing the Blank! message
I actually prefer to show "Blank" when there are no results vs 0% which might be confused as a real 0%.
Hm, there's no "Conditional formatting" option for the KPI card. Only "Color Coding" which I tried as explained in OP.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
100 | |
94 | |
80 | |
63 | |
56 |
User | Count |
---|---|
248 | |
122 | |
110 | |
77 | |
70 |