All tips

Group Notion table by counts

In some cases, you may need to sort or group your table based on counts, which refers to the number of items you have for each group, tag, etc.

Notion does not have native support for this functionality, but you can use a workaround by creating a second database:Instead of using tags or other methods to group your items, use a relation property in the database.

  1. In database 2, calculate the count using the length() formula. These counts will become your new group names. You can also include the name of the group within the formula (e.g., format(length(Database 1))+" item(s) — "+ Name).
  2. Roll up that formula in database 1.
  3. Since you can't group by rollups, add a formula in database 1 to retrieve the information from the rollup.
  4. Group database 1 by the last formula (using alphabetical or reverse alphabetical sort, depending on your needs).
  5. You can then hide the rollup and formula in database 1 as they are no longer needed.

I created an example — feel free to duplicate it if needed!

Notion sort table by counts

Master Notion, 5 minutes a week

Want to be in the loop with everything Notion? Join the 10,000+ Notioneers on the #1 Notion-focused newsletter.
Every Tuesday, I’ll hit you up with an email, giving you 3 tips on how to make the most of Notion, 2 (awesome) resources, and 1 Tweet of the Week.

Latest issues