Populating calculated values in rows

Hello Gurus,

I have come up with the below requirement. My requirement is where ever you see "`=" that value needs to be calculated. I mean that these values are unknow in a table and we need to populate them using the logic provided. I am stuck at how to implement these logics or what type of nodes to use. Like the Year and month part needs to be populated too automatically and we need to put some intelligence into it like after all the months are over it will automatically understand that the year value needs to be changed. If we use coding here then directly using CASE or IF..ELSE we can implement this but how can we do it with the nodes? The example data is attached for your reference.