Solved: How to use Notion Formulas 2.0 to calculate a weighted project completion percentage from a related tasks database
📌 The Problem Explained
Section titled “📌 The Problem Explained”In standard project management, many users rely on a simple percentage (Completed Tasks / Total Tasks). However, this method assumes all tasks are equal. In reality, a “Fix Typo” task might take 5 minutes, while a “Build Homepage” task takes 20 hours.
Without weighted formulas, your project progress bar will show 50% completion even if the two remaining tasks are the most labor-intensive parts of the project. To get an accurate picture, you need to assign a Weight (effort, points, or hours) to each task and calculate progress based on the sum of weights of completed tasks versus the total potential weight.
💡 The Quick Solution
Section titled “💡 The Quick Solution”Assuming your Projects database is related to a Tasks database, and your tasks have a Weight (Number property) and a Status (Checkbox or Status property), use this formula in your Projects database:
let( totalWeight, prop("Tasks").map(current.prop("Weight")).sum(), doneWeight, prop("Tasks").filter(current.prop("Status") == "Done").map(current.prop("Weight")).sum(), if(totalWeight > 0, doneWeight / totalWeight, 0))Note: Change "Status" == "Done" to match your specific status name or use current.prop("Done") == true for checkboxes.
🛠️ Step-by-Step Breakdown
Section titled “🛠️ Step-by-Step Breakdown”1. Database Preparation
Section titled “1. Database Preparation”Ensure your databases are structured as follows:
| Database | Property Name | Property Type |
|---|---|---|
| Tasks | Status | Status (or Checkbox) |
| Tasks | Weight | Number (representing effort) |
| Projects | Tasks | Relation (to Tasks database) |
| Projects | Progress | Formula |
2. Implementation Steps
Section titled “2. Implementation Steps”| Step | Action | UI Path |
|---|---|---|
| 1 | Open your Projects database and add a new property. | + Add a property > Formula |
| 2 | Name the property “Weighted Progress” and click Edit. | Property Name > Edit Formula |
| 3 | Paste the code from the “Quick Solution” above into the editor. | Formula Editor |
| 4 | Set the number format to percentage. | Edit Property > Number format > Percent |
| 5 | Enable the progress bar or ring visualization. | Edit Property > Show as > Bar |
3. Understanding the Formula Logic
Section titled “3. Understanding the Formula Logic”let(...): This creates variables (totalWeightanddoneWeight) to keep the formula clean and readable..map(current.prop("Weight")): This looks at every related task and “grabs” the number in the weight column..filter(...): This isolates only the tasks that meet your “Completed” criteria..sum(): This adds the extracted weights together.if(totalWeight > 0...): This prevents a “Divide by zero” error if a project has no tasks assigned yet.
⚠️ Common Mistakes to Avoid
Section titled “⚠️ Common Mistakes to Avoid”- Empty Weight Values: If you leave the Weight property empty on a task, Notion treats it as 0. This will skew your percentage. Ensure every task has at least a weight of “1” for a baseline.
- Mismatching Status Names: If your Status property uses “Complete” instead of “Done,” the
.filter()function will return 0. Double-check that the text inside the quotation marks matches your status label exactly. - Circular Relations: Ensure you are pulling the weight from the Tasks relation and not trying to reference a Rollup. Formulas 2.0 can access related data directly, making Rollups unnecessary for this calculation.