Group by week dataview table

Hi all

pretty new to Obsidian and getting started with dataview.

What I’m trying to do

I want to create weekly summaries to track my habits.
As example, let’s say I want to check if I read at least 100 pages each week.

Things I have tried

In my daily notes I have the number of pages read:

**Reading_Pages**:: 60

I’m using the following code on the overview page:

TABLE WITHOUT ID
week,
choice(sum(rows.pages_read) >= 100 , "🟩 (" + sum(rows.pages_read) +")", "🟥 (" + sum(rows.pages_read) +")") as 📚
FROM "Daily Notes/notes"
GROUP BY (dateformat(date(file.name), "yyyy-WW")) as week
SORT week DESC

Problem

It actually works very well, with one exception: the first week of the year is missing.

I only have a few daily notes so far (last week of December and beginning of January). 2023-52 is displayed and so is any other week 2024-02, 2024-03, 2024-04… that I have tried. But 2024-01 is simply not displayed.

Strange thing is, that it works if displayed in another table:

TABLE WITHOUT ID
(dateformat(date(file.name), "yyyy-WW")) as week,
file.link as Date,
choice(pages_read > 10, "🟩 (" +pages_read + ")" , "🟥 (" + pages_read +")") as 📚 
FROM "Daily Notes/notes"
SORT file.day DESC
LIMIT 50

so I assume it has something to do with the group by function ?

Thanks for any help!