Team Structure Table

Hey all!

I have a people table of my team. I want to create a column that will aggregate all of their direct reports and teammates that ultimately report up to them.

| [TEAM MEMBER] | [DIRECT MANAGER] | [DIRECT REPORTS / TEAM]

(These are my current columns I have. Direct manager is a look up to the table.)

The problem is when I have a manager who has managers below them. I’d like to bring in that whole structure… Recursively. How would you approach that? Looking for any and all ideas!

Thaaaaaaaank yooooou!

Hi @Camille_Nussbaum ,

your team column has to be a lookup column of the same table with a formula that filters all team members who have “this row” as their direct manager plus the team column values of these people. The result then needs to be flattened via ListCombine and straightened via Unique.

As Coda slows down quickly with recursive formulas like these I would recommend to put the logic into a single button that populates the team column. This button can then be pushed manually or by automation whenever rows become changed to update the hierarchy.

Do you know how to implement this now or do you need more details on the formula?

2 Likes

Details on the formula is what I am looking for. I’m not sure how to write anything recursively… :thinking:

Okay @Camille_Nussbaum , this formula for “direct reports/team” should take care of it:

WithName([Team members].Filter([Direct Manager]=thisRow), directMembers, ListCombine(directMembers, directMembers.Team))

If only one direct manager is possible, “Unique()” actually isn’t necessary.

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.