I don't know that I follow the question. You don't store calculations in tables - you do calculations in queries when needed.
Perhaps it is your table structure that is confusing.
In plain English - let's consider a Customer -- CustomerX
CustomerX gets "serviced" on Date1. Other Customers receive various "services" on various Dates.
CustomerX returns for more service and receives service on DateA.
To get the latest serviceDate for CustomerX (approach untested)
Code:
Select CustomerID, serviceDate from table where
Customer = "CustomerX" and
serviceDate = (Select Max(serviceDate) from table as A
where customerId = "CustomerX")
To get the second last serviceDate for CustomerX (untested) You want to find the second latest serviceDate for this Customer.
So -approach is to get the latest date, and then get the latest serviceDate for this Customer that is not the latest serviceDate.
Code:
Select CustomerID, serviceDate from table where
Customer = "CustomerX" and
serviceDate = (Select Max(serviceDate) from table as A
where customerId = "CustomerX" AND
serviceDate Not IN
(SelectMax(serviceDate) from table as B
where customerId = "CustomerX")
);
Note: This is for the approach -- the code has not been tested.
The next real question is how do you define Months --- using Datediff you could get Days or Months-- but how many days in a Month???