I am trying to automate a value calculation on difference between due date and start date to a Custom Fields.
when a start date is set on a card with a due date
set custom field
Workdays
to
{{cardduedateyeardaynumber}-{cardstartdateyeardaynumber}}
When I try this, the activity log says 'Cleared Custom Field "Workdays" in card'.
How do I perform this calculation, tried looking at an old quest from 2021, but it did not help at all.
Hi Shindlay,
From what you've described with trying to calculate the difference between Start Date and Due Date into a field, the Amazing Fields power-up can help.
With Amazing Fields, you can use formulas calculate field values instead of automation. Date subtraction works natively, so you can calculate the day difference between the two dates and have it update automatically whenever either date changes.
For example, for your use case, you'd add your source fields {Start date} and {Due Date} as well as your calculated field {Difference between start date to due date}. For the {Difference between start date to due date} field, you would add the below formula to calculate the difference:
(YEAR ({Due date}) > 1970 && YEAR ({Start date}) > 1970) ? ( {Due date} - {Start date} ) / 86400000 : 0
You can install Amazing Fields from the Trello Power-Ups directory and set everything up in just a few clicks. Read more here: https://trello.com/power-ups/60e068efb294647187bbe4f5/amazing-fields
Hope this helps! Reach out to the Amazing Fields team for more support if needed at support@amazingpowerups.com.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.