Notion Mastery student and Notion Ambassador Jeff asked in the community forums this week:
"How do I count how many items are nested as sub-items [when using the sub-items feature of table views]?"
For example, if we had sub-items in a Notion database like:
We can get information about Parent from Grandparent through a relation, but how would we get information about Child from Grandparent? For example, if we wanted to be able to count the number of the Grandparent's ancestors (Parent, Child #1, and Child #2 = 3 people), how would we do that in Notion?
Enter recursion.
Recursion in Notion Formulas is a particularly tricky programming exercise. One of the designers at Notion who created the Formula language made a guide for understanding recursion (which I've linked in the solve below), but I thought I'd create a simple example with sub-items showing how this works.
Our students can request formula solves in the community forums, but sometimes I like to share a teaser of one of our solves publicly so y'all can get a taste of the types of help we provide to our students learning formulas.
My formulas course covers all the fundamentals of Notion's formulas language, but sometimes the solves are complex enough to go outside of fundamentals!
P.S. If you've been on the fence about investing in your formula skills, hit reply and I'll send you your choice of 20% off coupon for Formula Fundamentals OR 10% off Notion Mastery (which includes the formulas course, of course!).
Until next time. Happy Notioning!
— Ben