How to filter tasks in dataview by multiple criteria, i.e. folder and tags

Things I have tried

dv.taskList(dv.pages('"Daily Notes"').file.tasks .where(t => !t.completed))

What I’m trying to do

I’ve found how to list incomplete tasks using the below code but I’d like to be able to filter by both the folder location and tags present in the containing note. Is this possible? What can be added to this query to filter those results that also contain specific tag(s)?

Question: do you prefer dataviewjs or simple dataview dql query?

DataviewJS

```dataviewjs
dv.taskList(dv.pages('"yourfolder" and #yourtag').file.tasks 
.where(t => !t.completed))
```

DQL

```dataview
TASK
FROM "yourfolder"
WHERE contains(file.tags, "#yourtag") AND !completed
```
4 Likes

Thanks!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.