Is there a way to calculate the actual duration for an issue? | Community
Skip to main content
Level 2
August 25, 2020
Solved

Is there a way to calculate the actual duration for an issue?

  • August 25, 2020
  • 1 reply
  • 1498 views

I want to see how long it takes each issue to complete, but using actual entry dates vs actual completion dates. I do not want to use the planned dates.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by NicholeVargas

Jocelyn,

There are a few different ways to calculate this value using text mode. If you wanted to take into consideration all (calendar) days, rounded to 2 decimal places, you would use the following text mode code:

displayname=Issue Duration

valueformat=HTML

valueexpression=ROUND(DATEDIFF({actualCompletionDate},{entryDate}),2)

If you wanted to only take into considering weekdays, you would use the following text mode code:

displayname=Issue Duration

valueexpression=ROUND(WEEKDAYDIFF({entryDate},{actualCompletionDate}),2)

valueformat=HTML

Additional information regarding calculated data expressions can be found here: https://one.workfront.com/s/article/Calculated-data-expressions-679086747

Another option would be to create a calculated custom field on an Issue Custom Form so that you can group or chart by the Issue Duration value.

If you have any questions, let me know!

1 reply

NicholeVargas
Adobe Employee
NicholeVargasAdobe EmployeeAccepted solution
Adobe Employee
August 26, 2020

Jocelyn,

There are a few different ways to calculate this value using text mode. If you wanted to take into consideration all (calendar) days, rounded to 2 decimal places, you would use the following text mode code:

displayname=Issue Duration

valueformat=HTML

valueexpression=ROUND(DATEDIFF({actualCompletionDate},{entryDate}),2)

If you wanted to only take into considering weekdays, you would use the following text mode code:

displayname=Issue Duration

valueexpression=ROUND(WEEKDAYDIFF({entryDate},{actualCompletionDate}),2)

valueformat=HTML

Additional information regarding calculated data expressions can be found here: https://one.workfront.com/s/article/Calculated-data-expressions-679086747

Another option would be to create a calculated custom field on an Issue Custom Form so that you can group or chart by the Issue Duration value.

If you have any questions, let me know!

Level 2
September 28, 2020

Hi Nichole,

Is there a way to extend this to only consider working days based on a schedule in the system? Just counting the working days rather than all weekdays?

NicholeVargas
Adobe Employee
Adobe Employee
September 3, 2021

@Ryan Kirk‚

This should work! I added an IF statement so that it says if the planned completion date is less than today, show as a negative, otherwise, show as a positive:

displayname=Weekdays to Planned Completion

textmode=true

valueexpression=IF($$TODAY>{plannedCompletionDate},CONCAT("-",ROUND(DIV(WORKMINUTESDIFF($$TODAYb,{plannedCompletionDate}),480),0), " Days"),CONCAT(ROUND(DIV(WORKMINUTESDIFF($$TODAYb,{plannedCompletionDate}),480),0), " Days"))

valueformat=HTML

If you have any questions, let me know!