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).
39 posts - 21 participants