Hey there Coda Makers!
I’ve been tasked with creating a resource management system for our company and I want to use Coda for that. Now I’ve created the bulk of the setup, but I came across a formula limitation I can’t overcome.
How can I create a formula that would count the % of utilisation of a given employee based on the assignments of that employee?
To give you some context, this is the current setup:
Employees Table
- contains the list of all employees.
Columns:
- Name: Name of the employee.
- Current Contract: Fraction of full-time employment (e.g., 1 for 100%, 0.5 for 50%).
- Utilization: A calculated column that should display the employee’s current % utilization.
Assignments Table
- tracks the assignments of employees to projects.
Columns:
- Employee: Relation to the Employees table.
- % of FTE: The percentage of their FTE used for this assignment.
- Start date and End date: The dates defining the duration of the assignment.
Now, I want the Utilization column in the Employees table
to calculate the total % utilization of an employee today.
I’ve tried using a combination of Filter
, FormulaMap
, and Sequence
, but I keep running into issues with overlapping assignment dates.
This is the formula that I use:
[Assignemnts (TEST)].Filter(
Employee= thisRow AND Today() >= [Start date]
AND (Today() <= [End date]
OR [End date].IsBlank())
).[% of FTE].Sum()
/
(thisRow.[Current Contract]*100)
The problem arises when I have assignments like this one:
Employee A is assigned to project Z for 100% of his FTE from the 1st of December till the 14th of December.
Then the same employee is assigned to project X for 100% of his FTE from the 16th of December till 31st of January 2025.
Using the formula I pasted above, the result for Utilization is 133.33%.
How would you approach solving this problem?
I don’t really understand why the formula I created counts the 2nd assignment if it’s start date is higher than today ;(
Thanks for any tips!
PS - This is a simplified version of the system I’m building: Resource Management System (For demonstration)
Edit: fixed some typos