Progress bar: counting tasks within a project within an objective

Hi all! I’m here to ask for help again.

Context:

  • I have an Objectives (as in OKRs) table with a lookup column that connects to Projects.
  • I have a Projects table with a lookup column that connects to Tasks.
  • I have a Tasks table.

Essentially, I want to track progress on objectives by measuring the number of tasks within that objective’s projects, and compare that to the number of completed tasks within that objective’s projects.

The Problem:
I’ve added a progress bar column to Objectives that uses a custom formula for both the maximum and the value, but they’re not being calculated correctly. These are the formulas I’ve used:

  • Value: “thisRow.Projects.Tasks.Filter(TaskStatus.Contains(Complete)).Count()”
  • Maximum: “thisRow.Projects.Tasks.Count()”

Here’s the link to the doc. Please take a look and let me know what I’m doing wrong with this progress bar.

Thank you in advance! :pray:

1 Like

Hi @Shaina_Nacion :blush: !

In both of your formulas, thisRow.Projects.Tasks returns a List of lists of rows (and not simply a List of rows), as the visual cue/hint Coda is showing :blush:

So, you might want to try to use ListCombine() to flatten the thisRow.Projects.Tasks :blush: .

For the Max value within your Progress Bar, this seems to work :

thisRow.Projects.Tasks.ListCombine().Count()

And for count of your completed tasks :

thisRow.Projects.Tasks.ListCombine().Filter([Task Status] = Complete).Count()

I hope this helps :innocent: !

1 Like

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