Getting a count of subtasks (self referencing table question

Hello!

I have a tasks table, with a self referencing lookup field called “Parent Task.”

I want to create a formula field that tells me the number of tasks with that task set as the parent… i.e. subtasks.

How would I do that?

Thank you!

Andrew

Hey @Andrew_Mason an example doc would be helpful here … Maybe this would work?

=[thistable].filter([parent tasks]=[thisrow.parent tasks])

Hi Andrew,

The below is an excerpt from my CODA reference doc. There is a working example on the page “Mathematics Formulas in Tables”. Replace the .Average() formula with .sum().
tab - Table name
col = Column name

Formula used for “colAverage per topic” Column

[tabAverage Formula].Filter(colTopic=thisRow.colTopic).colNumber.Average()

English: In the tabAverage table, find all the rows that are the same topic as the topic of this row, and calculate the average for the selected rows.