Question

I have a calculated column called DaysDifference which calculates days difference between two date fields: [Due Date]- [DateToday], I am updating datetoday field everyday using Flow to set it to current date.

I am using below calculated formula for another calculated column called Due in Days:

=IF(DaysDifference<=7,"7",IF(DaysDifference<=15,"15",IF(DaysDifference<=30,"30",IF(DaysDifference<0,"Overdue"))))

Then I have grouped the list view by Due in Days column and it works great for 4, 15, 30 days scenario but for the last condition its not working. For example I have a task for which (Due Date: 2/14, todays date: 3/14) DaysDifference shows -27. So this is an overdue task but from the formula I am using, its falling under "7". Can someone help me with the updated formula.

I just want to log overdue in calculated column if DaysDifference column shows negative value.

enter image description here

Was it helpful?

Solution

Change the order of your tests. Start with the "over due" test. You may also want a value if >30 days.

=IF(DaysDifference<0,"Overdue",
   IF(DaysDifference<=7,"7",
     IF(DaysDifference<=15,"15",
       IF(DaysDifference<=30,"30",
        "Over 30")
       )
     )
   )

OTHER TIPS

try this :

=IF( AND ( DaysDifference<=7 ,DaysDifference>=0) ,"7",IF(DaysDifference<=15,"15",IF(DaysDifference<=30,"30",IF(DaysDifference<0,"Overdue"))))
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top