Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
I have created a measure
This is my measure for color scale.
I am using conditional formatting for background colour but its not changing,.
Solved! Go to Solution.
Hi, @Anonymous
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create a measure like below.
Result =
var _status =
MAXX(
'Table',
'Table'[Status]
)
return
SWITCH(
_status,
"Completed a","#0000FF",
"Not Completed b","#008000",
"Completed c","#FFFF00",
"Not Completed d","#FF0000",
"Completed e","#DCDCDC",
"Not Completed f","#778899"
)
Then you need to set the color format for the card visual as below.
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create a measure like below.
Result =
var _status =
MAXX(
'Table',
'Table'[Status]
)
return
SWITCH(
_status,
"Completed a","#0000FF",
"Not Completed b","#008000",
"Completed c","#FFFF00",
"Not Completed d","#FF0000",
"Completed e","#DCDCDC",
"Not Completed f","#778899"
)
Then you need to set the color format for the card visual as below.
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , is it selectedvalue or the first measure which going to return complete?
Try the formula with the first measure.
if([Auto & ISO ..] = "Complete" ............... )
Also try to use Switch(True() ..
example
Switch(True(),
<Condition>, <result>,
<Condition>, <result>,
<Condition>, <result>,
/// Add more
,<Else result>
)
Thanks for your rpl,
I have so many measures in similar way and the values inside the measre changes as the end user selects the Dates from the slicer.
It should look like this
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |