I have one year of data related to premiums, and I want to split this data by months and calculate the subtotals for each month. For example, January may have 5 rows, while February may have 10 rows. How can I dynamically split this data into tables as shown in the example?