How can I subtract the previous entry from a calculated entry in a mileage column?

Ritterskamp, Jay 20 Reputation points
2023-10-10T05:04:26.7233333+00:00

I have a column called mileage, and I want to calculate the difference between the current mileage and the previous mileage. I tried to reference the previous mileage entry with "Previous," but I am not getting the expected result. What is the correct way to reference the previous entry in this case?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,230 questions
{count} votes

Accepted answer
  1. Xyza Xue_MSFT 30,076 Reputation points Microsoft External Staff
    2023-10-11T01:52:45.25+00:00

    Hi @Ritterskamp, Jay ,

    I understand. Thank you very much for the detailed explanation. When you initially create a column called mileage and fill in a mileage, in this case we'll call it "previous mileage", previous mileage is stored in a list version. Then you update the mileage in the column called mileage, which is called "current mileage", which is stored in another list version. There is no way we can simply identify the previous mileage with the formula. Because they are not stored in the same list version, we use formulas to perform calculations only for data in the same version.

    For example, previous mileage and current mileage are two columns in a list version that we can calculate using the formula.

    When I received the case, I searched a lot of documents did a lot of researches. And I feel regretful to inform you that it turns out to be a by-design one.

    During my search I found that it may be possible to get previous value of updated SharePoint List Item via Power Automate. if you are considering implementing it this way, you can refer to this post:https://dev.to/thebernardlim/power-automate-get-previous-value-of-updated-sharepoint-list-item-1kcb


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.