I got a spreadsheet book for 12 months/sheets, each new sheet is thru a copy of the preceding sheet in which the referral formulas need to be updated in the current sheet. Usually, this worked fine with MS Excel and previous LibreOffice versions.
… What usually worked is replicating formulas taking into account the subtotals until the preceding month and brought in on the current month to have new subtotals in the current sheet/month.