Expand my Community achievements bar.

SOLVED

Need text mode help with rounding Actual Duration to whole number

Avatar

Level 4

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

 

 

jamesmillerzjd_0-1677081631157.png

 

1 Accepted Solution

Avatar

Correct answer by
Level 4

Final result

jamesmillerzjd_2-1677181167048.png

 

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

 

View solution in original post

4 Replies

Avatar

Community Advisor

@jamesmiller-zjd 

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)

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

jamesmillerzjd_0-1677169875657.png

 

Avatar

Level 4

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#M51...

 

jamesmillerzjd_1-1677175620929.png

 

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

 

 

Avatar

Correct answer by
Level 4

Final result

jamesmillerzjd_2-1677181167048.png

 

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