Help

Re: If/Then Statement with Year

Solved
Jump to Solution
1211 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Margie_Stahl
4 - Data Explorer
4 - Data Explorer

Hello there!

I am brand new to Airtable formulas and was hoping to get some help. I’m attempting to calculate NPS just for this calendar year of 2022. I was able to calculate the NPS for all of my results but when I try to modify it to add in just for the year 2022 as an If/Then statement it doesn’t work. Here is what I have been attempting to use. Thank you so much for your help!

IF(

Date}=2022

)

THEN(

{NPS Score}=BLANK(),BLANK(),

IF({NPS Score} < 7,-100,

IF({NPS Score} > 8,100,

0)))

1 Solution

Accepted Solutions
Kamille_Parks
16 - Uranus
16 - Uranus

THEN() is not a function in Airtable. IF()s look like this

IF(
condition,
value if true,
value if false
)

Your formula should probably be

IF(
  {Date} = 2022,
  IF(
    {NPS Score} = BLANK(),
    BLANK(),
    IF(
      {NPS Score} < 7,
      -100,
      IF(
        {NPS Score} > 8,
        100,
        0
      )
    )
  )
)

If {Date} is a full date instead of just a year then your formula should instead include YEAR({Date}) = 2022

See Solution in Thread

2 Replies 2
Kamille_Parks
16 - Uranus
16 - Uranus

THEN() is not a function in Airtable. IF()s look like this

IF(
condition,
value if true,
value if false
)

Your formula should probably be

IF(
  {Date} = 2022,
  IF(
    {NPS Score} = BLANK(),
    BLANK(),
    IF(
      {NPS Score} < 7,
      -100,
      IF(
        {NPS Score} > 8,
        100,
        0
      )
    )
  )
)

If {Date} is a full date instead of just a year then your formula should instead include YEAR({Date}) = 2022

Thank you SO much!!! It worked!