0

I'm trying to add a column to a table I created in SharePoint. I want the column to do the following: Given the status of an action e.i. due or over due, calculate the number of days that the action has been raised. So I wrote a formula to calculate this taking the values from the column Date Raised and today's date.

=IF(OR([Status]="Overdue",[Status]="Due"),DATEIF([Date Raised],[Today],"d"))

When I click the OK button I get

Sorry, something went wrong The formula contains a syntax error or is not supported

I would appreciate if someone could point out what I'm doing wrong

Aakash Maurya
  • 8,481
  • 4
  • 42
  • 74
wntrc
  • 1
  • 2

2 Answers2

0

I read other posts and I managed to solve the problem. By using today() the formula would be:

=IF(OR(Status="Overdue",Status="Open"),(TODAY()-[Date Raised]),"")

It worked perfectly throughout the entire table

wntrc
  • 1
  • 2
  • 1
    Note that the Today( ) function does not do what you want it to do (update every day): http://sharepoint.stackexchange.com/questions/151144/how-to-use-today-and-me-in-calculated-column/151336#151336 – Danny '365CSI' Engelman Feb 21 '17 at 07:36
0

Using the Today() Function is exactly the same as using [Modified]

Because SharePoint Formulas only re-calculate the Formula when:

  • the Item is updated

  • or the Formula itself is edited

So you daily check does not work.

Details and workarounds to do Today calculations in Views: How to use Today and Me in Calculated column

Danny '365CSI' Engelman
  • 21,176
  • 7
  • 35
  • 79