Forum Discussion

JackWoods's avatar
JackWoods
Qrew Trainee
7 months ago

Overdue Duration Formula most be positive # of Days

Hey QuickBase Community, I have a Duration Formula field that is looking at the difference between "today()" and the finish date of a given task record. the field is designed to tell me if the record is past due based on the finish date.

the issue is it gives me a negative number of days for the task that are still yet to be completed aka not overdue yet.

can you help me format this duration formula so that it only shows a positive # of days when the task is officially overdue?

If([Status]="Overdue",Today() - [Finish Date],If([Status]="Not Started",Today() - [Finish Date],If([Status]="In Process",Today() - [Finish Date],null)))

 



------------------------------
Jack Woods | Low Code 4 Lyfe
------------------------------

2 Replies

  • You can just check first to see if Finish date is in the future and nullify it. You also don't have to nest each new if as a new statement to make it more readable, you can just do like so: 

    If(

    [Finish Date]>=Today(), null,

    [Status]="Overdue",Today() - [Finish Date],
    Status]="Not Started",Today() - [Finish Date],

    [Status]="In Process",Today() - [Finish Date],

    null)



    ------------------------------
    Chayce Duncan
    ------------------------------
    • JackWoods's avatar
      JackWoods
      Qrew Trainee

      Thank you, Chayce. that worked. 



      ------------------------------
      Jack Woods | Low Code 4 Lyfe
      ------------------------------