How to Calculate Positive or Negative Delivery Days in SharePoint
Question details
The user needs a SharePoint calculated column formula to accurately display early or late delivery days without the value dynamically changing every day.

- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- Tracking project or item delivery statuses (early or late) using specific completion dates rather than rolling daily dates.
- Observed behavior
- When using TODAY() or NOW() in formulas, the calculation changes every day, breaking fixed historical tracking. A static result based on completion dates is needed.
Ensure you have 'Designer' or 'Owner' permissions for the SharePoint list to add or modify calculated columns. Carefully note the exact internal names of your date columns before writing the formula.
Use Date Completed Instead of TODAY() for Fixed Delivery Days
By referencing the actual recorded completion date rather than a dynamic date function, the calculated delivery days will remain permanently fixed for accurate historical records.
Dynamic functions like TODAY() recalculate whenever the item is updated or viewed under certain conditions, making them unsuitable for static historical tracking. Referencing a fixed 'Date Completed' column solves this issue.
Open your SharePoint list, click on the gear icon (Settings) in the top right corner, and select 'List settings'.
Scroll down to the Columns section and click on 'Create column'. Enter a name for your new column (e.g., 'Delivery Variance') and select 'Calculated (calculation based on other columns)'.
In the formula box, input the following IF statement: =IF([Status Outcome]="Late",[Hire Date]-[Date Completed],IF([Status Outcome]="On Time",DATEDIF([Date Completed],[Hire Date],"d"),"")). Note: You must replace bracketed names with your exact column names.
Below the formula box, set 'The data type returned from this formula is' to 'Number', adjust decimal places if necessary, and click 'OK' to save your new column.

Analyze Exported SharePoint Lists Easily with WPS Office
While SharePoint manages your live lists, analyzing exported list data, creating complex reports, and formatting charts is often easier in a dedicated spreadsheet application. WPS Office offers a free, lightweight alternative to Microsoft Excel with high compatibility for all your exported SharePoint data.
- 1. Export List Data: In your SharePoint list, click 'Export' from the top command bar and choose 'Export to Excel'.
- 2. Open with WPS Spreadsheet: Launch WPS Office and open the downloaded .iqy or .xlsx file to view your SharePoint data offline.
- 3. Apply Advanced Formulas: Use WPS Spreadsheet's built-in formula library to perform advanced date tracking and calculations securely on your desktop.

Frequently Asked Questions
Why does my SharePoint calculated column give a syntax error?
This typically happens if the column names in your formula do not perfectly match the internal column names in your list. Ensure you use exact matches, distinguishing between slight variations like 'Hire Date' and 'Hired Date'.
Can I use TODAY() in a calculated column for historical data?
It is not recommended. TODAY() updates dynamically, meaning your delivery days calculation will change continuously. Always use a static column like 'Date Completed' for fixed historical records.
How does DATEDIF work in SharePoint formulas?
The DATEDIF function calculates the difference between two dates. For example, DATEDIF([Start Date], [End Date], "d") returns the exact number of days between the two specified dates.
How can I display negative days in a SharePoint list?
Standard date subtraction (e.g., [Expected Date] - [Actual Date]) will naturally yield a negative number if the actual completion date occurs after the expected date. Set the calculated column to return a 'Number' to display the minus sign correctly.




