Jul 27 2023 01:46 AM
Hello,
I have a Sharepoint List with a Calculated Column (DaysLeft4Due) that calculates a date difference in days between a Due Date (date column) and Today().
Even though I have several records with the same Due Date, some records in the Calculated Column have different values..
The formula in the calculated column:
=DATEDIF(TODAY();[Due date];"D")
This has me puzzled, what could be the reason?
Thanks in advance!
Jul 27 2023 06:02 AM
Hi @Miguel_Lujan,
The reason for the varying values in the "DaysLeft4Due" column is likely due to the way SharePoint handles the calculation and updates of calculated columns.
SharePoint calculated columns are not automatically updated in real-time for all items in the list. Instead, they get updated or recalculated when the item is created or modified. So, if you have multiple items with the same Due Date, the "DaysLeft4Due" value might not be the same for all of them, especially if the "Today()" function doesn't update simultaneously for all items.
Let me try to explain it in simpler terms:
When an item is created or modified, SharePoint calculates the "DaysLeft4Due" for that specific item using the "Due date" and the current date at that moment. However, since other items in the list might have been created or modified at different times, their "Today()" value may differ, resulting in slightly different "DaysLeft4Due" values even for the same Due Date.
If two items have the same Due Date, but one was created a day before the other, their "Today()" value would be different, and that leads to different "DaysLeft4Due" values.
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.
Kindest regards,
Leon Pavesic