Expand my Community achievements bar.

SOLVED

Is there a way to report number of days difference on a task approval start date compared to the project planned completion Date?

Avatar

Level 3

I am after a report that tells me the number of days difference from a task approval start time in comparison to the Project Planned completion date is this possible?

Cheers Dan

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi Dan!

You have 2 options. If you just want to see the column with the number on a task report, you can set up a column with the following formula:

------------

displayname=Weekday Diff

textmode=true

valueexpression=WEEKDAYDIFF({approvalStartDate},{project}.{plannedCompletionDate})

valueformat=HTML

------------

OR if you need calendar days:

------------

displayname=Calendar Diff

textmode=true

valueexpression=DATEDIFF({project}.{plannedCompletionDate},{approvalStartDate})

valueformat=HTML

------------

The downside to a "valueexpression" like this is that the value isn't groupable, sortable, or chartable. So if you want to do any of those things, your only option would be to create a custom form for tasks, attach it to the tasks (probably best to do it at the template level so it doesn't require ongoing maintenance). Then you'd add a calculated field to the form, that uses the following formula:

WEEKDAYDIFF(Approval Start Date,Project.Planned Completion Date)

OR for calendar days:

DATEDIFF(Project.Planned Completion Date,Approval Start Date)

View solution in original post

2 Replies

Avatar

Correct answer by
Level 4

Hi Dan!

You have 2 options. If you just want to see the column with the number on a task report, you can set up a column with the following formula:

------------

displayname=Weekday Diff

textmode=true

valueexpression=WEEKDAYDIFF({approvalStartDate},{project}.{plannedCompletionDate})

valueformat=HTML

------------

OR if you need calendar days:

------------

displayname=Calendar Diff

textmode=true

valueexpression=DATEDIFF({project}.{plannedCompletionDate},{approvalStartDate})

valueformat=HTML

------------

The downside to a "valueexpression" like this is that the value isn't groupable, sortable, or chartable. So if you want to do any of those things, your only option would be to create a custom form for tasks, attach it to the tasks (probably best to do it at the template level so it doesn't require ongoing maintenance). Then you'd add a calculated field to the form, that uses the following formula:

WEEKDAYDIFF(Approval Start Date,Project.Planned Completion Date)

OR for calendar days:

DATEDIFF(Project.Planned Completion Date,Approval Start Date)

Avatar

Level 4

One (confusing) thing worth mentioning is that WEEKDAYDIFF and DATEDIFF have inverse syntax - so in WEEKDAYDIFF, Date 2 variable is listed first, but in DATEDIFF formula, Date 1 is listed first. You can see a list of formulas and their syntax here.

In your example, I set Approval Start Date as the "Date 2" variable, just so you aren't seeing negative values there. The only time it would be negative is if a task's approval path was started AFTER the project's planned completion date.

If you prefer the negative value when the task was started prior to that project's planned completion date, you can just swap the order of the variables in the formulas that I provided.