Help

The Community will be undergoing maintenance from Friday February 21 - Friday, February 28 and will be "read only" during this time. To learn more, check out our Announcements blog post.

Help with DATEADD formula for start up date depending on 'Tier'

Topic Labels: Formulas
1164 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Event_Branding
4 - Data Explorer
4 - Data Explorer

I’m trying to set up a formula to determine the start up date of a project depending on whether it is a Tier 1 or Tier 2 event. Tier 1 will have a 4 month lead time. Tier 2 event will have a 3 month lead time.

IF ({Tier} = 1, DATEADD({Event start}, -4, ‘month’)
IF ({Tier} = 2, DATEADD({Event start}, -3, ‘month’)

This formula is ‘invalid’ - please help!

2 Replies 2

Welcome to the Airtable community!

You need a different nesting to you formula.


IF(
  {Tier} = 1, 
  DATEADD({Event start}, -4, 'month'),
IF(
  {Tier} = 2, 
  DATEADD({Event start}, -3, 'month')
))

There are many ways to do things in code. Here is another option.


DATEADD(
  {Event start}, 
  SWITCH( {Tier},
    1, -4,
    2, -3
  ), 
  'month'
)

Thanks so much, the second formula worked!