Help with a calculated field | Community
Skip to main content
KellieGardner
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
July 17, 2023
Solved

Help with a calculated field

  • July 17, 2023
  • 3 replies
  • 1086 views

I won't get into details around why it's needed but we are looking to do a calculated field in a task view that would show us the % complete Workfront thinks a task should be at. For these projects we use Planned Hours to calculate our % Complete 

 

Ideally it would look similar to this

NameDurationPln HrsPlanned Start DatePlanned Completion Date% Complete
(native Workfront field that currently exists and allows updates)
Calculated field to show what % should be
Task 110 days40 Hoursxxxx30.00%50%
Task 2100 days50 Hoursxxxx25.00%75%
Task 35 Days5 Hoursxxxx10.00%5%
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 KellieGardner

I finally stumbled upon an answer in the community https://experienceleaguecommunities.adobe.com/t5/workfront-questions/attempting-to-calculate-quot-expected-percent-complete-quot-if-a/m-p/508011#M39761

 

displayname=Expected % Complete

textmode=true

valueexpression=IF({plannedStartDate}<$$TODAY,IF(ROUND(((WEEKDAYDIFF({plannedStartDate},$$TODAY)+1)/(WEEKDAYDIFF({plannedStartDate},{plannedCompletionDate})+1)*100),2)>100,"100%",CONCAT(ROUND(((WEEKDAYDIFF({plannedStartDate},$$TODAY)+1)/(WEEKDAYDIFF({plannedStartDate},{plannedCompletionDate})+1)*100),2),"%")),"0%")

valueformat=HTML

3 replies

VicSellers
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
July 17, 2023

Hi @kelliegardner - Is the below what you're looking for? It's the % of Planned Hours / Actual Hours. I wasn't fully clear on what the calculation criteria was here, so let me know if not!

 

displayname=Custom % Complete textmode=true valueexpression=DIV({workRequired},{actualWorkRequired}) valueformat=asPercent
KellieGardner
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
July 17, 2023

@vicsellers - so the calculation is tricky in my mind so I probably didn't do a good job explaining. And it's Monday. 🙂

 

What we are hoping to see is what the percent complete should be on each task. So not based on any actual work that's happened but a calculation of how much work (percentage wise) should have taken place by now. 

 

Hopefully that makes more sense. 

 

Thanks,

Kellie

Heather_Kulbacki
Community Advisor
Community Advisor
July 18, 2023

@kelliegardner how would you want to go about determining what that %complete should be?

Is a matter of (task 1, for example), the planned start date was 5 days ago in a 10 day duration task, so we should be 50% done by now? Workfront will divide your 40 hours evenly over those 10 days, so I don't think you need to consider hours in there.

For that, have you tried something along this line: ($$TODAY-plannedStartDate)/duration

 

Or is there some other expectation for what the %complete should be?

KellieGardner
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
July 18, 2023

Thanks Heather. This is exactly what I came up with while I was sleeping last night, dreaming about Workfront calculations and it got be partially there. 

Heather_Kulbacki
Community Advisor
Community Advisor
July 18, 2023

LOL It's so great to know I'm not the only one who dreams in Workfront!

KellieGardner
Community Advisor and Adobe Champion
KellieGardnerCommunity Advisor and Adobe ChampionAuthorAccepted solution
Community Advisor and Adobe Champion
July 18, 2023

I finally stumbled upon an answer in the community https://experienceleaguecommunities.adobe.com/t5/workfront-questions/attempting-to-calculate-quot-expected-percent-complete-quot-if-a/m-p/508011#M39761

 

displayname=Expected % Complete

textmode=true

valueexpression=IF({plannedStartDate}<$$TODAY,IF(ROUND(((WEEKDAYDIFF({plannedStartDate},$$TODAY)+1)/(WEEKDAYDIFF({plannedStartDate},{plannedCompletionDate})+1)*100),2)>100,"100%",CONCAT(ROUND(((WEEKDAYDIFF({plannedStartDate},$$TODAY)+1)/(WEEKDAYDIFF({plannedStartDate},{plannedCompletionDate})+1)*100),2),"%")),"0%")

valueformat=HTML