You may experience blank comparison period values in Google Sheets queries if your query uses the following combinations:
- Year & week dimension with comparison to "Previous period of same length"
- Year & month dimension with comparison to "Previous period of same length"
If you experience this issue, use the "Same dates a year ago" or "Same dates a year ago, matching day of week" comparison period.
Issues with leap years
Comparing data for leap years can cause some issues. For example, comparing data for February 29, 2024 to last year's data for the same day will try to compare the data to February 29, 2023, which doesn't exist. So, the comparison will instead take the next available date, March 1, 2023, and use that as the comparison data. The comparison will then continue with this offset, meaning that March 1, 2024 will compare to March 2, 2023, and so on.
This also means that the last date of the selected range will be empty/zero as the date it wants to compare to is not in the data set. For example, if the end date of the query is March 11, 2024, it would try to find March 12, 2023, but this isn't in the date range as it would stop at March 11, 2023. This means that the comparison value returns as empty per the known issue described further up the article.
We're hoping to find a solution to this issue soon.