In February 2023 Power BI released new feature – “Conditional Formatting based on string fields”. You can now set conditional formatting rules based on string fields.
Following the below steps-
Step1: Add column chart with some fields. See the below given screen shot.
In X-axis you can see the two fields
Product. And in Y-axis
Step 2: Select the visual and go to the Format visual tab >Expand Column section> under Colors section click on fx icon just next to Default.
Step-3: One dialog box opens > choose Rules in format style > Select Column name > Type String/Text value > OK.
Step-4: Now you can see the final result as below.
Chart color has been changed based on string fields value.
Refer other Power BI topics: Power BI tutorials