Summing inline fields in tasks for only a specific status

I had a question about how to sum inline fields in tasks. It was answered in Summing inline fields in tasks

Now I would like to filter only tasks in a status like Todo (not started, not finished, not postponed or such) but I can’t get this to work.

All help would be appreciated! TIA.

What is your current query? And what is wrong with it?

I have a sheet with a lot of tasks. Each task has an inline field [pts::0] or another value.

one query: =round(sum(this.file.tasks.pts)) shows me the total of points of all tasks, regardless of the status.

a second query: = round(sum(filter(this.file.tasks, (t) => !t.completed).pts)) gives me the total of pts for every task that is not yet completed. I would like to be granular so I can query statusses that are open ([ ]), started ([/]), canceled ([-]), etc.

I have tried replacing the t.completed with t.open, t.todo, and other obvious words (and removing the ! of course), but to no avail. Also tried t.status === “TODO”, but this also didn’t work out, as the comparison throws an error.