Tasks filter using the filename as the due date

What I’m trying to do

I have the calendar plug in creating Daily Notes which is linked to a template that amongst other things filters and groups tasks. I would like it to filter the tasks by the day that the daily note was made for i.e. the title of the Daily Note

Things I have tried

I thought I had it with

filter by function task.due.formatAsDate === query.file.filenameWithoutExtension

Not sure why it’s not working. Open to suggestions however prefer not to use Dataview

For tasks isn’t the correct way to filter the current file just using path includes {{query.file.path}} ?