A useful trick related to Dataview queries is to think of the first line being the last line. In other words, what you define in the TABLE ... before the FROM line is done at the end of the query. Then you could see that Date isn’t defined.
So try this variant instead:
```dataview
Table WITHOUT id
length(rows) as Count, key
FROM "path/to/folder"
WHERE contains(State, "Finished")
FLATTEN row["Finish Date"] as Date
group by Date
```
Now the group by statement has something to work with, and it also stores its result in the key field. Another variant could be to do the following:
```dataview
Table WITHOUT id
length(rows) as Count, Date
FROM "path/to/folder"
WHERE contains(State, "Finished")
GROUP BY row["Finish date"] as Date
```