Dataview Table for Tags by Frequency

What I’m trying to do

I’m a new user and I’m trying to create a “Dashboard” of my daily note tag frequency. I’ve got it almost working but I can’t seem to get it to sort in order of most frequent to least frequent. Any help?

TABLE 
	length(rows.file.name) as numfiles , join(rows.file.link, ", ") as files 
FROM 
	"Daily Notes"
flatten 
	file.tags as tag 
group by 
	tag 

Things I have tried

I’ve tried looking here and on Reddit but didn’t see any answers.

Maybe, you could try to add a SORT length(rows.file.name) DESC at the end of your query ?

```dataview
TABLE 
    length(rows.file.name) AS numfiles, 
    join(rows.file.link, ", ") AS files 
FROM 
    "Daily Notes"
FLATTEN
    file.tags AS tag 
GROUP BY 
    tag
SORT length(rows.file.name) DESC
```

Edit: SORT length(rows) DESC seems to be working too …

That works! Thank you so much!

1 Like

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