Help

Nested formula only partially working

Topic Labels: Formulas
Solved
Jump to Solution
855 4
cancel
Showing results for 
Search instead for 
Did you mean: 
RedPanda
4 - Data Explorer
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
Alexey_Gusev
12 - Earth
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... )

See Solution in Thread

4 Replies 4

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

Screenshot 2024-04-25 at 10.39.24 AM.png

 Link to base

Alexey_Gusev
12 - Earth
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... )

RedPanda
4 - Data Explorer
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).

It is in Logical functions, third item under IF.