Skip to main content

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!

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'

)




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!


Reply