How Do I Create a Formula That in This Table's Column, Adds up the Total Number Rows, With Various Numbers of Those Rows Having the Same Set of Values, From a Different Table?

What’s up, Coda community? :wave:

I’ve been around for a while, but have only just recently began to use Coda more seriously. Maybe you can help me. I’m still learning to master Coda formulas. (This is my problem; I’m a Coda formula newbie so I’m going through all the training I can.) I’ve broken my request below down into four areas; TLDR, context, desire, and request to help you help me. If you’re unable to help me, I’m happy for you to simply point me in a good direction. Thank you in advance for your help! :+1:

TLDR;

How Do I Create a Formula That in This Table’s Column, Adds up the Total Number Rows, With Various Numbers of Those Rows Having the Same Set of Values, From a Different Table? My request below might be a better way to ask the question.

Context (What I have):

I have a table in a Coda document that is meant to track my Blog’s posts. That table currently has 4 columns; Title, Author, Date Published, Link. The table currently has 224 rows since I’m tracking 224 blog posts.

This table was pasted from a Google Sheets document. Coda wonderfully and correctly formatted all of the columns. So the Title column is text, the Author column is a select list, the Date Published column is a date picker, and the Link column is text.

To take advantage of the benefits and features Coda gives me, I then turned the Author column into another table and inserted that table just below the first. The new table was created from the select list that the Author column was. Then, I added a column to that new table of Authors, called Authors Link so that I now have two tables; one for managing posts and relevant data about posts, the other for managing authors and relevant data about authors. Currently my authors table has 29 rows since I’m tracking 29 authors.

Desire (The end result I want):

I’d like to now add a third column to my Authors table and have that column automatically add up how many posts each author has published. That’s it for now. But eventually, I’d like to also have other similar columns for the new, unpublished posts each author is working on or has in que for publishing.

Request (A question to help solve my problem):

Can you please help me create the formula I would need, for Coda to count the number of posts (which is in one table) for each author (which is in another table), then automatically give me the sum of existing posts in a new column I’m creating inside the Authors table? Either that, or point me in the right direction with relevant show and tell examples.

Thanks!
Rafael

Hey @getraf! Glad you are ready to learn more Coda :slightly_smiling_face:

So far, looks like you have a great start with your two linked tables. The next step in this kind of situation is often to to pull in the back-links of rows. In this case, all the blog posts for each author. Then that column can be referenced by a multitude of formulas doing interesting things.

I hope this gif helps:

output

1 Like

@Ryan_Martens2 You are the man! This is perfect. Now I gotta study this a bit closer to better understand what’s going on under the hood. Thank you.

1 Like