How to create task lists with DATAVIEW based on tags associated with individual tasks

I have several files, each containing a list of tasks. I have tagged each individual task contained in said lists, hoping to be able to retrieve some automated list of tasks that have the same tags. I would basically like to use DATAVIEW to retrieve all tasks that have a certain tag.

Right now, specifying the tag in the Dataview task command retrieves all the tasks contained in a file in which the given tag appears even once. In other words, dataview does not differentiate between tasks that have been tagged with the wanted tag and tasks which have been tagged with other tags. As long as they appear in a document in which the given tag appears even just once, both types of tasks are retrieved regardless of where the tag appears.

Any suggestions on how to proceed?
thank you in advance.

Hi.

Yes, any tag in your page/file/note it’s a metadata at file level.

But the content of the tasks (i.e., the text) it’s also a metadata at task level. So, you can filter by text:

```dataview
TASK
FROM ""
WHERE contains(text, "#yourtag")
```
14 Likes

thank you very much !

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