Calculating Percent Complete for a Project

Hello all. I’ve searched on this topic and found no hits so I’m posting here.

I’d like to create a field in our app that would calculate the percent complete of each project. For each project, I’d like to count the total number of tasks. Then, I’d like to count the total number of tasks that are “Completed”. I would then use those 2 values to calculate and store the percent complete on the Project record.

I have no experience developing in Knack have developed for years. Any information would be greatly appreciated.

Thanks in advance.

Dave

Hi @Dave

Your fields would be:

Projects object:

  • Count of tasks (Field type: Count). Under Connection to Count select Tasks.
  • Count of completed tasks (Field type: Count). Under Connection to Count select Tasks. Under Formula Filters select Completed.
  • Percent complete (Field type: Equation). Write your equation like this: {Count of completed tasks} / {Count of tasks} Under Number Format select % (percentage).

Tasks object:

  • Project (Field type: Connection to Projects object)
  • Status (Field type: Multiple Choice)

Your existing records might show blank values because these are computed fields—that’s normal, you just need to update those records so the equations are applied, then the values should populate.

Result:

Ian
Knack Pros

1 Like