I am not sure if i am following what you mean?
Does the table show change in the number in number of loans month on month?
so First line for Resolved you have 12 in bucket 1, The 1 bucket 2 because there have been a change of one in the number loans.
If so you can look at peek previous functions to approach in Script.
or in table look at the before() Function.
What I will do is I will be looking for the records from the previous month in any of the mentioned buckets in the current month and then i will count number of records.
Viz: If the ID for a particular record was in the previous month but not in any of the buckets in current month then it will be classified as Resolved. If the record was in Bucket 1 in previous month and has moved to any of the buckets between bucket 2- 7 then it will be classified as Moved Forward, If the record was in bucket 7 in the previous month and in the current month moved to any of the buckets between Bucket 2-6 then it will be classified as Moved Backward, if there is no change in the bucket from previous to the current month then classified as "Retained".
Kindly advise how to get this in the form of above table.