In your Tasks
table, I assume you have a checkbox field to mark a task as “Done”. Create a formula field called {Status Rollup}
with something like this:
IF({Done}, 1)
Now in your Projects
table, first create a Count field called {Total Tasks}
that counts the number of linked Tasks
.
Now create a Rollup field called {Task Status Rollup}
, that rolls up the {Tasks}
linked records, the {Status Rollup}
field, and uses the SUM(values)
rollup function. This technique is called a conditional rollup – you created a conditional field in the Tasks
table that has the value 1 if the task is completed, and is blank otherwise. Then you rolled up this conditional field to total up the number of completed tasks linked on the Project
.
You now have the two integers you need to get your percentage - Tasks Completed / Total Tasks. So just create a formula field called {Percentage Done}
with this formula:
IF(
{Tasks},
{Task Status Rollup} / {Total Tasks}
)
And format that field as a percentage.