Need text mode help with rounding Actual Duration to whole number | Community
Skip to main content
JamesM-MERGE
Level 4
February 22, 2023
Solved

Need text mode help with rounding Actual Duration to whole number

  • February 22, 2023
  • 1 reply
  • 1166 views

I'm trying to display the Actual Duration on a Task report in whole numbers of days. My text mode below is including the first decimal.

Any help is appreciated!

 

aggregator.displayformat=minutesAsDaysString
aggregator.function=SUM
aggregator.namekey=actualduration
aggregator.valuefield=actualDurationMinutes
aggregator.valueformat=intAsInt
displayname=
linkedname=direct
namekey=actualduration
querysort=actualDurationMinutes
textmode=true
valueexpression=ROUND(({actualDurationMinutes}/60)/8,0)
valuefield=actualDurationMinutes
valueformat=compound#M:D
viewalias=actualduration

 

 

 

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 JamesM-MERGE

I found some another article that helped me solve this. However, it doesn't include the "Days" label now.

https://experienceleaguecommunities.adobe.com/t5/workfront-questions/exclude-weekends/m-p/573644#M51778

 

 

My (nearly) final text mode:

valueexpression=ROUND(DIV(WORKMINUTESDIFF({actualStartDate},{actualCompletionDate}),480),0) valuefield=dateVariance valueformat=doubleAsString aggregator.valueexpression=ROUND(DIV(WORKMINUTESDIFF({actualStartDate},{actualCompletionDate}),480),0) aggregator.function=SUM aggregator.displayformat=compound aggregator.valueformat=doubleAsString aggregator.namekey=datevariance displayname=Actual Duration namekey=datevariance width=50 description=Total Task Hour textmode=true usewidths=true shortview=true

 

 


Final result

 

Final text mode:

aggregator.displayformat=compound aggregator.function=SUM aggregator.namekey=datevariance aggregator.valueexpression=CONCAT(ROUND(DIV(WORKMINUTESDIFF({actualStartDate},{actualCompletionDate}),480),0)," Days") aggregator.valueformat=asString description=Total Task Hour displayname=Actual Duration namekey=datevariance shortview=true textmode=true usewidths=true valueexpression=CONCAT(ROUND(DIV(WORKMINUTESDIFF({actualStartDate},{actualCompletionDate}),480),0)," Days") valuefield=dateVariance valueformat=asString width=50

 

1 reply

Heather_Kulbacki
Community Advisor
Community Advisor
February 23, 2023

@jamesm-merge 

I may be wrong, but give either of these a try for your value expression, I think your next-to-last paren just needs to shift:

valueexpression=ROUND(({actualDurationMinutes}/60/8),0)

 

valueexpression=ROUND(({actualDurationMinutes}/480),0) - since you were dividing by 60 (minutes in an hour) then by 8 (hours in a day) you can replace that with just 480 (minutes in a day)

JamesM-MERGE
Level 4
February 23, 2023

Thanks Heather! I tried both and I'm still getting the same result.

 

JamesM-MERGE
Level 4
February 23, 2023

I found some another article that helped me solve this. However, it doesn't include the "Days" label now.

https://experienceleaguecommunities.adobe.com/t5/workfront-questions/exclude-weekends/m-p/573644#M51778

 

 

My (nearly) final text mode:

valueexpression=ROUND(DIV(WORKMINUTESDIFF({actualStartDate},{actualCompletionDate}),480),0) valuefield=dateVariance valueformat=doubleAsString aggregator.valueexpression=ROUND(DIV(WORKMINUTESDIFF({actualStartDate},{actualCompletionDate}),480),0) aggregator.function=SUM aggregator.displayformat=compound aggregator.valueformat=doubleAsString aggregator.namekey=datevariance displayname=Actual Duration namekey=datevariance width=50 description=Total Task Hour textmode=true usewidths=true shortview=true