I searched dataview, tags, and tasks in Obsidian Forum and found a few articles. The following were helpful and nearly what I needed. However, the queries I find seems to no longer work. Seems the syntax may have changed.
Build a dataview that lists all tasks and tags where the tags contain “#elephant” in my daily journal note (template)—so I can reflect on them while journaling through the day.
I’ve also tried these queries and got the following results—still not getting it:
This query is close and works but lists all tags—a good starting point. I still need to figure out how to filter on tasks with tags containing “#elephant” and list all task.tags.
```dataview
TABLE WITHOUT ID (tag + "(" + length(rows.file.link) + ")") AS Tags, sort(rows.file.link) AS Files
FROM ""
WHERE file.tags
FLATTEN file.tags AS tag
GROUP BY tag
SORT length(rows.file.link) DESC
In this example, I’m trying to find how to list the tags from the task—but can’t find the right syntax. No dice—I’m not finding the right syntax to display tags.
```dataview
TABLE WITHOUT ID (tag + "(" + length(rows.file.link) + ")") AS Tags, sort(rows.file.link) AS Files, file.tags AS Taglist
FROM ""
WHERE file.tags
FLATTEN file.tags AS tag
GROUP BY tag
SORT length(rows.file.link) DESC
you want a table with tasks… but you know that tasks in table are just text, not an interactive tasks with checkbox?
you want to see in the table the text/content of each task that contains the tag “#elephant” in his own text, not in generic page content?
you said «all tasks and tags where the tags contain “#elephant”» - this is not clear. besides the tag #elephant (deducing that is a tag placed in the tasks), which other tags you want to see? other tags in same task? other tags in the same file?