Bases – Show Summary Totals Only (Hide or Remove the Rows Being Counted)

In daily notes (yyyy-mm-dd) I record the country I am in each day with country: Name of Country.

With Bases, I can query all the notes for a given year and then group by and sum the country values – see sample screenshot below.

Is it possible to only show the filled totals, without having to have hundreds of rows in the note?

```base
views:
  - type: table
    name: Table
    filters:
      and:
        - "!country.isEmpty()"
    groupBy:
      property: country
      direction: ASC
    order:
      - file.name
      - country
    summaries:
      country: Filled

```
1 Like
  • Added table summaries. To use use them, right-click a table column and choose “Summarize…”. Choose from the list of built-in summary functions, or write your own.

- Obsidian 1.10.0 Desktop (Early access) - Obsidian

Know 1.10.0 is in beta, but does anyone know if there is a guide anywhere on how to write your own summary functions? Looked at help and the release notes. No joy.

Still trying to figure this out. Smiled when I just saw that Google AI currently thinks that the ‘solution’ to my question is my question :person_facepalming:

Wonder if Google will now add this post to its ‘solution’.

I think you’d need to go “the other way around” to get a base displaying something like the 1st table in your screenshot :thinking:

In other words, you’d need to link each daily to a “country note” and query these “country notes” in a base…
Then you could add a formula to count how many daily notes are linked to each country :blush:

1 Like

Many thanks for the suggestion.

Not clear how I could get a single total, as any filter, such as file.hasLink(this.file.name), will create a table that has lots of rows. Fear that I am thinking about your idea the wrong way.

Would also mean, I think, that I would need to edit over 5,000 daily notes to link them to the country files.

With Dataview, I could use the following for a summary from the daily notes, without having to see the countable rows:

```dataview
TABLE WITHOUT ID
	length(rows.country) as Days,
	country AS Country
FROM "Daily Notes"
WHERE contains(file.name, this.year)
GROUP BY country
FLATTEN country 
SORT length(rows) DESC
```

Everything works fine in Bases in terms of getting the counts I need, other than for the fact that for complete years I have to see and scroll through hundreds of rows that I don’t need to know about.

Really an aesthetics issue: nice to have but not imperative. Presume the help files will be expanded when 1.10 is formally released. Perhaps I’ll glean something from them which will help me to do what I want. Assume I won’t be the only person with such a need, although it looks as though I am at the moment. :joy:

Thanks, again. :star_struck:

That would probably be an issue yes :sweat_smile:

Another one is that the formula would make use of file.backlinks which is, I think, not the most performant …

But then, to get the count you could use a formula similar to :

file.backlinks.filter(value.asFile().properties.country == file).length

… or something else, depending on the metadatas of your daily notes :blush:

The opposite is also possible: Storing the daily notes tied to a specific country in the metadatas of the “country note” … but you would still have some work to do :sweat_smile:

1 Like

Thank you.

If I add a simple daily note in my test vault and use the filter suggested:

  1. I see a count of 0, and I don’t see the country name
  2. I see all files in the test vault
  3. I see lots of rows in the table, not just the summary totals

I am clearly lost. Grateful for any pointers.

---
country: Denmark 
---

This file name is `2025-10-11`

```base
formulas:
  Untitled: file.backlinks.filter(value.asFile().properties.country == file).length
views:
  - type: table
    name: Table
    order:
      - file.name
      - formula.Untitled

```

After days spent chasing my own tail, I have decided, while I still have a single atom of sanity left, to give up on the idea of getting this to work in my vault . Pch (above) has shown the feasibility of what I have tried to do, so hopefully Google’s AI will now refer to their post instead of the garbage in my original question.

Thanks, Pch :raising_hands: :star_struck: