Hi everyone! I hope you are all excited about the recent roll out of the Advanced Editor for Formula fields as I recently announced here.
That post includes a video where I had the chance to showcase various use cases, so I thought Iâd create this post to share more details on how I built them, which will hopefully inspire you while you try out the Advanced Editor for Formula fields (rolling out on Business and Enterprise tiers).
1. Task Duration:
Prerequisites: Start & Due dates on tasks
Formula 1: ((Due date-Start date)/1440)+1 = Duration a task will take in days, or copy paste this into the adv. editor: (( [[$DUE_DATE]] - [[$STARTED_AT]] )/1440)+1
Formula 2: ((Due date-Start date)+0)/60 = Duration a task will take in hours with decimals, or copy paste this into the adv. editor: ( ( [[$DUE_DATE]] - [[$STARTED_AT]] ) + 0 ) / 60
Formula 3: ((Due date-Start date)/1440)+1*24= Duration a task will take in hours without decimals, or copy paste this into the adv. editor: ( ( [[$DUE_DATE]] - [[$STARTED_AT]] ) / 1440 + 0 ) * 24
Note: The exception is that these formulas do not display a value of 1 day for tasks that only have a due date. The hack is to simply remember to insert the start date as well, to be on the same day as the due date! Also, you can toggle between using +0 or +1 which will either add a day if you want a task on a single day to count for one day long.
2. Project Duration in days (for Portfolios)
Prerequisites: your projects have a start and an end date, i.e. the âDateâ field in your portfolio is populated accordingly.
Formula: 0+(Date-Start date)/1440 = Duration of project in days
or copy paste this into the adv. editor: 0 + ( [[$DATE]] - [[$STARTED_AT]] ) / 1440
Note: in Portfolios, the Due date is referred to as simply âDateâ.
To show the value in weeks AND days (better than the native âDurationâ field in Portfolios:
Basic Formula: Date - Start Date
3. Project Daily/Weekly Budget (for Portfolios)
Prerequisites: your projects have a start and an end date, i.e. the âDateâ field in your portfolio is populated accordingly. And you also have an âEstimated budgetâ currency type number field.
To show the Daily Budget:
Formula: Estimated budget / ((Date-Start date)/1440)
To show the Weekly Budget:
Formula: Estimated budget / ((Date-Start date)/1440) * 7
(where 7 is the days in the week, but this could also be 5, depending on the working days)
4. Remaining Project Budget (for Portfolios)
Prerequisites: your projects have an âEstimated budgetâ currency type number field as well as an âActual spentâ currency type number field.
Basic Formula: Estimated budget - Actual spent
5. Set the Estimated budget based on the Daily Budget (for Portfolios)
Prerequisites: your projects have a start and an end date, i.e. the âDateâ field in your portfolio is populated accordingly. And you also have a âDaily budgetâ currency type number field.
Formula: Daily budget * (Date-Start date)/1440
Note: add 2 decimal points to âDaily budgetâ currency field to get the resulting âEstimated budgetâ currency value in 2 decimals also.
6. Story Points to Estimated hours:
Prerequisites: You have a number type custom field called âStory Pointsâ:
Formula: Story Points * 8 = Estimated hours
(where 8 is the amount of hours that is equal to 1 story point, i.e. in this case, one working day)
Note: add 2 decimal points to your âStory pointsâ number field to get the âEstimated hoursâ formula in 2 decimals also.
7. Story Points to Hours remaining:
Prerequisites: You have a number type custom field called âStory Pointsâ and using Asanaâs native âActual timeâ field.
Formula: (Story Points * 8) - Actual time / 60 = Hours remaining
(where 8 is the amount of hours that is equal to 1 story point, i.e. in this case, one working day)
Note: add 2 decimal points to your âStory pointsâ number field to get the âEstimated hoursâ formula in 2 decimals also.
8. Hourly rate * Actual Time = Cost
Prerequisites: You have a currency type number field called âHourly rateâ and using Asanaâs native âActual timeâ field.
Formula: Hourly rate * Actual time / 60 = Cost
Note: you do NOT need to add 2 decimal points to your âHourly rateâ number field since the resulting currency will be in 2 decimals.
9. Hourly rate * Actual Time = Cost + TAX = Total Cost
Prerequisites: As per above formula.
Formula: (Hourly rate * Actual time) * 1.24 = Total Cost including Tax
(where 1.24 = 24% tax)
Note: you do NOT need to add 2 decimal points to your âHourly rateâ number field since the resulting currency will be in 2 decimals.
10. Show the value of added TAX to any cost value
Prerequisites: Any formula which includes a currency type number field.
Formula (example): (Hourly rate * Actual time) * 0.24 = Total value of Tax
(where 0.24 = 24% tax)
Note: you do NOT need to add 2 decimal points to your âHourly rateâ number field since the resulting currency will be in 2 decimals.
11. Cost per item x Quantity with applied discount +TAX
Prerequisites: Any formula which includes a currency type number field. eg. A âCost per itemâ currency type number field and a number field for âQuantityâ (either one of these fields should have 2 decimals)
Formula (example): (Cost per item * Quantity) * 0.9 = Total value with a 10% discount
(where as 0.9 = -10% discount, 0.5 would be a 50% discount, 0.1 would be a 90% discount)
Note: add 2 decimal points to âCost per itemâ currency field to get the resulting formulaâs currency value in 2 decimals also.
To show the value of TAX added after the discount:
Formula (example): (Cost per item * Quantity) * 0.9 *0.24
(where as 0.24 = 24% tax)
To show the value including TAX after discount:
Formula (example): (Cost per item * Quantity) * 0.9 *1.24
(where as 1.24 = including 24% tax)
12. Cost per coverage x Area with applied discount +TAX
Prerequisites: you have a number field for âAreaâ and a currency type number field for âCost per coverageâ, i.e. in sqft / m2 (either one of these fields should have 2 decimals)
Formula (example): as per above formulas but instead of âQuantityâ use a number field for âAreaâ and instead of âCost per itemâ, use âCost per coverageâ.
Note: you will need to remove any custom labels for your âAreaâ field, such as âsqftâ or âm2â appended on the end as a custom label. Edit this field to change it to a simple number so that the resulting formulasâ values will show as per the currency set by the âCost per coverageâ field (sqft / m2).
See all of my top tips & tricks on my website.