Have Counter that shows number of files in Dataview Query/all files with specific tag/element?

I just started a new vault to track my book reading to try and replace parts of Goodreads, etc.

I have the following as a Dataview Query:
`

TABLE without id ("![coverimg|95](" + Cover + ")") as Cover, Title, Author, Year as "Published", Medium, DateStarted as "Date started", DateFinished as "Date finished",  TotalPages as "Page Count", Rating
WHERE Status = "Done"
SORT DateFinished desc

`

And this is the YAML that’s in each book note:

---
Author: 
Title: 
Year: 
Medium: 
CurrentPage: 
TotalPages: 
Status: 
Rating: 
DateStarted: 
DateFinished: 
Cover: 
---

I’d like to have a large number above the table that shows the amount of of entries in that table, so if I’ve read 10 boks, I’ll have a large “10” above the table. If at all possible, I’d also like to have this split into different numbers (and maybe one overall) depending on the category “Medium” so it would show one number for “Books” (meaning physical books) and one for “Audiobooks”.

Thanks :slight_smile:

Edit: also would it be possible to add up the total number of pages? So add the values for the TotalPages thing?
I tried this here but it didn’t work:

dv.paragraph(dv.pages()
	.TotalPages.array().reduce((acc, val) => acc + val, 0))

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