If it was only about aggregating data, grouping would probably have been enough. But since you want to do calculations based on the aggregated data it is cleaner to have two tables as you suggested.
So I just copied your data and did the following:
Changed your ‘Pay month’ column from text to date: You can still display it in a similar way as before and now it’s much easier to filter and sort accordingly.
Added a button to keep the tables in sync: It takes the unique ‘Pay months’ from the ‘Invoices’ table and checks if they exist in the ‘ROI’ table. If they don’t, new rows are created. You can create an automation to push this button daily for example.
Okay, no worries.
The table is dynamic, so no automation is required. You create 100 rows, and after a month, add them and it’s generated. You’re good for 100 months in advance.