Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I'm fairly new to Power BI and I am looking to change background colors in a Matrix based off the values being "Yes" "No" or blank.
Solved! Go to Solution.
H, @JShea50
Because your first measure did not consider the blank value.
If "Yes" then 1,else 0
>>>("No",blank) >0, "Yes">1
Try to modify your measure as follows
Measure =
SWITCH ( SELECTEDVALUE ( 'Spreadsheet'[Caterer] ), "Yes", 1, "No", 0, BLANK () )
result:
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
H, @JShea50
Because your first measure did not consider the blank value.
If "Yes" then 1,else 0
>>>("No",blank) >0, "Yes">1
Try to modify your measure as follows
Measure =
SWITCH ( SELECTEDVALUE ( 'Spreadsheet'[Caterer] ), "Yes", 1, "No", 0, BLANK () )
result:
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@JShea50 , It will not color blank value. Try a measure like this with the field value option
Measure = IF(coalesce(SELECTEDVALUE('Spreadsheet'[Caterer]),"No") ="Yes","Green","Red")
or
Measure = IF(coalesce(max('Spreadsheet'[Caterer]),"No") ="Yes","Green","Red")
For both equations, the same issue occured where the blank values are being colored red