Feb 22, 2020 03:53 AM
What is wrong with my nested if? It says that that It’s invalid
IF(
AND(
{5dayswithnochange},
{issueStatus🟢or🔴or🟠}=🟢
),
"Stable ⚖",
IF(
AND(
{5dayswithnochange},
{issueStatus🟢or🔴or🟠}=🟠
),
"Stuck 🆘",
IF(
AND(
{5dayswithnochange},
{issueStatus🟢or🔴or🟠}=🔴
),
"Broken 🔥",
"Too soon to tell ❔"
)
)
)
Solved! Go to Solution.
Feb 22, 2020 04:00 AM
nevermind, I forgot to add the quotes “” around the emojis :green_circle: in the equality evaluations
Correct code
IF(
AND(
{5dayswithnochange},
{issueStatus🟢or🔴or🟠}="🟢"
),
"Stable ⚖",
IF(
AND(
{5dayswithnochange},
{issueStatus🟢or🔴or🟠}="🟠"
),
"Stuck 🆘",
IF(
AND(
{5dayswithnochange},
{issueStatus🟢or🔴or🟠}="🔴"
),
"Broken 🔥",
"Too soon to tell ❔"
)
)
)
Feb 22, 2020 04:00 AM
nevermind, I forgot to add the quotes “” around the emojis :green_circle: in the equality evaluations
Correct code
IF(
AND(
{5dayswithnochange},
{issueStatus🟢or🔴or🟠}="🟢"
),
"Stable ⚖",
IF(
AND(
{5dayswithnochange},
{issueStatus🟢or🔴or🟠}="🟠"
),
"Stuck 🆘",
IF(
AND(
{5dayswithnochange},
{issueStatus🟢or🔴or🟠}="🔴"
),
"Broken 🔥",
"Too soon to tell ❔"
)
)
)
Feb 22, 2020 05:37 PM
Glad you were able to fix your issue yourself!
However, I happened to see your formula and thought you might be interested in a slightly simpler version. This version has less nesting and eliminates the need for the AND
functions. It also uses the SWITCH
function, which is really useful for when dealing with multiple possible values for a single field.
IF ({5dayswithnochange},
SWITCH({issueStatus🟢or🔴or🟠},
"🟢", "Stable ⚖",
"🟠", "Stuck 🆘",
"🔴", "Broken 🔥"
),
"Too soon to tell ❔"
)
Feb 22, 2020 11:59 PM
Tank you! simpler syntax indeed.