Can I use the Dataview to COUNT the number of tags within a note?

Hi @paoloap I don’t see an example of what you’re wanting for a final output, but the Dataview plugin should do what you’re looking for.

If you want a table of pages with the counts of tags on each page you can do the following:

```dataview
TABLE
		length(tags) as numtags
	, "#" + join(tags, ", #") as tags
FROM
		#docker or #kubernetes 
```

Which will give output similar to the following:

image

If on the other hand you’re wanting a table of tags and the number of pages that they are on, then you need a little more involved dataview query:

```dataview
TABLE
		length(rows.file.name) as numfiles
	, join(rows.file.link, ", ") as files
FROM
		#docker or #kubernetes 
flatten
		file.tags as tag
group by
		tag
```

This will give you something like the following:

image

Let us know if you have any questions.

9 Likes