You want to track how fast your team completes tasks over time and visualize whether velocity is increasing, decreasing, or staying flat. Notion formulas can calculate velocity as a numeric value, but building a formula that shows a trend direction requires combining date ranges, counts, and conditional logic. This article explains how to construct a Notion formula that computes project velocity from your database and outputs a trend indicator such as an arrow or a percentage change. By the end, you will have a working formula you can copy into your own project tracker.
Key Takeaways: Building a Velocity Trend Formula in Notion
- prop(“Completed Tasks”) / prop(“Days in Period”): Core calculation for raw velocity as tasks per day.
- dateBetween(prop(“End Date”), prop(“Start Date”), “days”): Computes the length of the analysis period in days.
- if(prop(“Current Velocity”) > prop(“Previous Velocity”), “↑”, “↓”): Returns a trend arrow based on velocity comparison.
Understanding Velocity Trend Analysis in Notion
Velocity in project management measures the amount of work a team completes in a fixed time interval, typically a sprint or a week. A trend analysis compares the current velocity to a previous period to show whether the team is accelerating, slowing down, or staying consistent. In Notion, you can build this analysis using database formulas that reference date fields, rollup properties, and number properties. You do not need external tools or plugins.
The key prerequisite is a Notion database that tracks completed tasks with a date property for when each task was finished. You also need a way to group tasks into time periods, such as weeks or months. A simple approach uses a formula that divides the count of completed tasks by the number of days in the current period, then compares that value to the previous period. This gives you a raw velocity number and a trend direction.
What Properties You Need
Before writing the formula, ensure your database has these properties:
- Date (date property): The date the task was completed. Name it “Completed Date”.
- Status (select property): Mark tasks as “Done” or “Complete”.
- Sprint (select or text property): Identifies which sprint or week the task belongs to.
- Task Count (rollup property): Counts the number of tasks in the current period. You can also use a formula that counts directly if you group by sprint.
If you do not have a sprint property, you can use a formula that calculates the current week number and previous week number using the dateBetween function with now().
Steps to Build the Velocity Trend Formula
Follow these steps to create a formula that calculates velocity for the current period and shows a trend arrow. The example uses a weekly sprint. Adjust the date range as needed for your own cycle.
- Create a Formula Property for Current Period Start
Add a formula property named “Period Start”. Enter this formula to get the start of the current week:dateSubtract(now(), date(now()) - 1, "days"). This returns Monday of the current week. If you use monthly periods, usedateSubtract(now(), day(now()) - 1, "days"). - Create a Formula Property for Current Period End
Add another formula property named “Period End”. Enter:dateAdd(prop("Period Start"), 6, "days"). This returns Sunday of the current week. For monthly periods, usedateAdd(prop("Period Start"), 30, "days"). - Create a Rollup to Count Completed Tasks in Current Period
Add a rollup property named “Current Completed”. Configure it to count the number of tasks where the “Completed Date” is between “Period Start” and “Period End” and the “Status” is “Done”. The rollup formula is:count(prop("Completed Tasks")). - Create a Formula Property for Days in Current Period
Add a formula property named “Days in Period”. Enter:dateBetween(prop("Period End"), prop("Period Start"), "days") + 1. The +1 ensures you count the start day. - Create a Formula Property for Current Velocity
Add a formula property named “Current Velocity”. Enter:prop("Current Completed") / prop("Days in Period"). Format the result as a number with two decimal places. - Create a Formula Property for Previous Period Start
Add a formula property named “Previous Start”. Enter:dateSubtract(prop("Period Start"), 7, "days"). This shifts the start back by one week. - Create a Rollup to Count Completed Tasks in Previous Period
Add a rollup property named “Previous Completed”. Configure it to count tasks where “Completed Date” is between “Previous Start” and “Period Start” and “Status” is “Done”. - Create a Formula Property for Previous Velocity
Add a formula property named “Previous Velocity”. Enter:prop("Previous Completed") / 7. Use 7 as the days in the previous period. - Create the Final Trend Formula
Add a formula property named “Trend”. Enter this formula:if(prop("Current Velocity") > prop("Previous Velocity"), "↑ Up", if(prop("Current Velocity") < prop("Previous Velocity"), "↓ Down", "→ Flat"))
This returns an arrow and a text label. You can also show the percentage change by replacing the text with:round((prop("Current Velocity") - prop("Previous Velocity")) / prop("Previous Velocity") 100) + "%".
Once you complete these steps, each row in your database will display the current velocity and a trend indicator. To view the trend over multiple sprints, create a database view grouped by the sprint property and show the Trend column.
Common Mistakes and Limitations
The formula above works for a single row representing the current sprint. If you want historical trend analysis for multiple past sprints, you need a different approach because Notion formulas cannot reference other rows dynamically. Below are the most frequent issues and how to handle them.
Formula Shows Zero for Previous Velocity
If the previous period has no completed tasks, the division yields zero and the trend may show "Up" incorrectly. Add a guard clause: if(prop("Previous Velocity") == 0, "N/A", ...). Replace the ellipsis with the trend logic.
Rollup Does Not Count Tasks Correctly
Rollups in Notion require a relation between databases. If you are using a single database, you cannot use rollups to count tasks from different time periods. Instead, use a linked database view filtered by date range and count manually, or use a separate database for each sprint. The formula method described earlier assumes you have a relation to a tasks database.
Trend Does Not Update After Adding New Tasks
Notion formulas recalculate only when a property value changes. If you add a new task to the current period, the rollup may not update immediately. Refresh the page or edit any cell in the parent database to trigger a recalculation.
Notion Formula Methods for Velocity Trend: Single Database vs Related Database
| Item | Single Database (Formula-Only) | Related Database (Rollup) |
|---|---|---|
| Setup complexity | Low — all properties in one database | Medium — requires a relation and rollup properties |
| Count accuracy | Cannot count tasks in a date range directly; requires manual grouping | Accurate — rollup counts tasks that match date filters |
| Historical trend | Shows only current period vs previous period | Can show multiple periods if each sprint is a separate row |
| Recalculation | Triggers on property edit only | Triggers on rollup source changes |
Building a velocity trend formula in Notion requires careful property setup but gives you a live indicator of team performance. Start by creating the date and rollup properties, then copy the formula for the trend arrow. If you work with multiple sprints, consider using a separate database for each sprint to enable historical comparisons. As an advanced tip, add a formatDate(now(), "YYYY-WW") property to automatically label each sprint row with its week number, making the trend view easier to read.