Help

Save the date! Join us on October 16 for our Product Ops launch event. Register here.

Re: WORKDAY_DIFF (Completed Early)

1129 1
cancel
Showing results for 
Search instead for 
Did you mean: 
LilyUnder
4 - Data Explorer
4 - Data Explorer
Hello,
I am trying to get this formula to work and it is currently working for tasks completed on time or late and showing the correct # of days in between, but for tasks completed ahead of the expected finalization date it is not working and that is a mathematical issue as the "-1" I added in my formula to calculate the in between dates is adding to the number of days when a task is completed earlier.  How can I solve this issue?  Any ideas on a formula I can add so it understands that for tasks completed earlier (negative #) the -1 is not being added?

WORKDAY_DIFF({Expected Finalization Date},{Actual Finalization Date})-1
2 Replies 2
Ron_Daniel
8 - Airtable Astronomer
8 - Airtable Astronomer

Hi Lily,

There's probably a shorter way to do this using Switch, but here's a solution that should work:

IF(WORKDAY_DIFF({Expected Finalization Date},{Actual Finalization Date})-1>0,
WORKDAY_DIFF({Expected Finalization Date},{Actual Finalization Date})-1 & " days left.",
IF(WORKDAY_DIFF({Expected Finalization Date},{Actual Finalization Date})-1<0,
"Finished early!",
IF(WORKDAY_DIFF({Expected Finalization Date},{Actual Finalization Date})-1=0,
"It's on time!",
""
)
)
)

Screen Shot 2023-01-13 at 3.29.40 PM.png

Hi @Ron_Daniel  this is great, thank you! Now what about if I want to know the # of days only per task? Like 2 days late or 3 days early? What I am looking is the delta so that I can access if tasks are completed on time and for the ones late or early, are those late or early by X # of days, if that make sense?