Hi @Fahad Shaheen ,
Please use the following code (replace all occurrences of @currentField with @currentField.lookupValue):
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField.lookupValue",
"style": {
"color": "#000000",
"padding-left": "14px",
"font-weight": "bold",
"background-color": {
"operator": "?",
"operands": [
{
"operator": "==",
"operands": [
"@currentField.lookupValue",
"Highly Probable"
]
},
"#C00000",
{
"operator": "?",
"operands": [
{
"operator": "==",
"operands": [
"@currentField.lookupValue",
"Probable"
]
},
"#FF0000",
{
"operator": "?",
"operands": [
{
"operator": "==",
"operands": [
"@currentField.lookupValue",
"Possible"
]
},
"#FFC000",
{
"operator": "?",
"operands": [
{
"operator": "==",
"operands": [
"@currentField.lookupValue",
"Improbable"
]
},
"#D4D919",
{
"operator": "?",
"operands": [
{
"operator": "==",
"operands": [
"@currentField.lookupValue",
"Highly Improbable"
]
},
"#00B050",
""
]
}
]
}
]
}
]
}
]
}
}
}
The running result is as below:
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.