0

I tried to look for the answer in the forum and google, but with no success.

I have a list:

let's say:

'Site ID','Date requested'
11111, 2019-03-05
11110, 2019-03-15
11111, 2019-05-01

I want to create a column "Weeks since the last request" for the same "Site iD"

'Site ID','Date requested','Weeks since the last request'
11111, 2019-03-05,0
11110, 2019-03-15,0
11111, 2019-05-01,8 (rounded)

The best if it can be even populated with additional metadata, eg.

'Site ID','Date requested','Weeks since the last request','Type'
11110, 2019-03-05, 0, PSV
11111, 2019-03-05, 0, PSV
11110, 2019-03-15, 0, MV
11111, 2019-05-01, 8, PSV

Where the difference between 11110 PSV & MV is 0 because they are a different type, but the difference between 11111 is calculated because they are the same type.

I will be grateful for any help any resources to look into.

with best regards, Vladimir

0

SharePoint items are independent of each other. They are not rows in a table. So, you cannot write Calculated Column formulas that reach into the previous or next row for a value. (i.e. they are similar to rows in a SQL table.)

You have several ways to get to what you want...

  • Write workflows that when an item is created, it checks for a previous item, and generates a value for the new item. The problem is keeping these updated when a previous item gets updated.
  • Create a custom SharePoint Add-In that generates a report from the list, calculating values as the items are read from the list. (A JavaScript, HTML and CSS project.)
  • Prior to the Modern UI we could add JavaScript to the page (using SharePoint Designer) that created and displayed derived data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.