I’ve been working on this formula to calculate a date based on a status column. I’ve been spinning my wheels for the better part of this afternoon since it’s a huge part of our use case that I want to transfer out of excel.
FORMAT_DATE
(
SWITCH(
{Status},
"OFA",
IF(
TODAY() > ADD_DAYS({Submitted}, 21), ADD_DAYS(TODAY(), {Eq. Lead Time (Early)}),
ADD_DAYS({Submitted}, 7\*(3+{Eq. Lead Time (Early)}))
),
"Release Requested",
IF(
TODAY() > ADD_DAYS({Release Requested Date}, 14),
ADD_DAYS(TODAY(), 7\*{Eq. Lead Time (Early)}),
ADD_DAYS({Release Requested Date}, 7\*(2+{Eq. Lead Time (Early)}))
)
)
)
What am I missing here? I have tried a similar thing in a different column which works just fine:
FORMAT_DATE(
SWITCH(
{Status},
"OFA",
ADD_DAYS({Submitted},21),
"Release Requested",
ADD_DAYS({Release Requested Date},14)
)
)
Please save my sanity!