# Nested formula only partially working

Topic Labels: Formulas
Solved
959 4
cancel
Showing results for
Did you mean:
4 - Data Explorer

Hello,

I'm trying to create a mapping using IF and OR statement, in order to map a set of values for the 'Status' field to this new formula field.  This formula doesn't cause an errors, but it only partially works.  Does anyone know why this doesn't work?

`IF({Status} = "Complete",  "Completed",  IF(    OR(      {Status} = "Low Risk",      {Status} = "Candidate"    ),    "On track",    IF(      OR(        {Status} = "Medium Risk",        {Status} = "High Risk",      ),      "At risk",      IF(        OR(          {Status} = "New",          {Status} = "Needs Investigation",          {Status} = "Need More Info",          {Status} = "Under Review",          {Status} = "On Hold",          {Status} = "Deferred"        ),        {Status} = "Delayed",        IF(          {Status} = "Will Not Implement",          "Will not implement",          ""        )      )    )  ))`

The following inputs work, but the others do not: Complete, Low Risk, & Will Not Implement

Thank you.

1 Solution

Accepted Solutions
12 - Earth

Hi,
use switch

SWITCH({Status},
"Complete", "Completed",
"Low Risk", "On track",
"Candidate", "On track",
"Medium Risk", "At risk",
"High Risk", "At risk",
.....and so on... )

4 Replies 4
18 - Pluto

Try changing the line `{Status} = "Delayed"` to `"Delayed"`

12 - Earth

Hi,
use switch

SWITCH({Status},
"Complete", "Completed",
"Low Risk", "On track",
"Candidate", "On track",
"Medium Risk", "At risk",
"High Risk", "At risk",
.....and so on... )

4 - Data Explorer

Thank you.  This worked.  I wonder why it's not documented (or at least not in the AirTable docs I found on formulas).

12 - Earth

It is in Logical functions, third item under IF.