I am trying to do some data validation on some account balances and was not sure if there was an easier way to do the math. So the rules for how the account balance works is you can earn into the account but it must be used within 365 days of earning or it will expire.
Different ways the account can have the balance modified is Earning(+ to account), Redeem(- to account), Expire(- to account) and Adjustment(+/- to account).
This data goes back for over 10 years. The first idea which by no means works was to look at the newest 12 months and just do Earning-Redeem-Expire+/-Adjustments to get the balance. But the problem is that you don't have the beginning balance like that.
The second idea was to look at 24 months thinking that would show the beginning balance for the current 12 month active time frame. However I think this does not work for the same reason as you do not have the beginning balance of the 24 month time frame and that changes how much carries over to the beginning balance of the current 12 months.
With that being said I think this means we would have to look at the full set of data for each of the accounts. I was hoping that I mistaken and that there might be some nice math magic that can help find the answer without needing to look at lifetime transnational data.
If there is a better forum/tags for me to ask this question please feel free to reference it for me.
Edit: yes the oldest earning are redeemed first.
