The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.
Feb 26, 2020 08:58 AM
Hi there,
I’m trying to create a “ToDo” base with sub-tasks.
I have one table with different “project” in every row, and second table with a few tasks linked to each project.
Now, I want to create a rollup record to pull out the percent of the task that is already done.
(like if I have 2 tasks for one project, and one is checked, so it’s 50% done…)
How can I do it?
Thanks!
Solved! Go to Solution.
Feb 26, 2020 10:14 AM
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.
Feb 26, 2020 10:14 AM
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.
Feb 26, 2020 03:08 PM
Thank you so much, I’ll try it…
…and it works! thanks again…