Error "must be size 1574 or 1, not 8332" When Calculating Year-over-Year in Spreadsheet

When calculating year-over-year comparisons in spreadsheets, an error “must be size 1574 or 1, not 8332” occurs when the original data contains multiple instances of the same date information.

For example, the following data has one row per order, resulting in multiple instances of the same date:

In this case, the “must be size” error occurs.

However, when the data is aggregated so that one row represents one month

It becomes possible to calculate the previous year’s values without any issues.

Regarding the aggregation method, please refer to the following notes.