Forum Discussion
Help with SharePoint calculations
- Jun 15, 2023
You are welcome. Glad to hear that it worked for you!
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Alexandra420 Use formula like below:
=IF(OR(ISBLANK([Due date]),[Due date]=""),"0",IF([Due date] > TODAY(), -DATEDIF(TODAY(),[Due date],"d"),DATEDIF([Due date],TODAY(),"d")))
You have to wrap column inside square brackets like [Due date].
Note:
- Sometimes comma( , ) does not work in formula (it is based on language or regional settings on your site). So in that case use semicolon( ; ) instead of comma( , ).
- Use correct display name of your SharePoint columns in above formula.
- Column names can be case sensitive. So, use column names in formula accordingly.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- Alexandra420Jun 15, 2023Copper Contributor
THANK YOU SO MUCH! This worked like a charm. 🙂
- ganeshsanapJun 15, 2023MVP
You are welcome. Glad to hear that it worked for you!
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- Alexandra420Jul 05, 2023Copper Contributor
Good morning ganeshsanap,
Now the formula doesn't calculate correctly. I used what you gave me:
=IF(OR(ISBLANK([Due date]),[Due date]=""),"0",IF([Due date]>TODAY(),-DATEDIF(TODAY(),[Due date],"d"),DATEDIF([Due date],TODAY(),"d")))
and the #of Days Overdue is not calculating the correct overdue days - see below screenshot:
Any ideas?
Thanks
Alex