i have an assignment report with a column for duration. the results show numbers in hours, days, and weeks. how can i make it show a calculation of only days?
for example if the assignment is 4 hours, it would show as 0.5 days. or if it is 1 week, it would show 5 days.
furthermore, how do remove the "days" text from the result to where it only shows the number?
Views
Replies
Total Likes
@Justin_Charles You can use the following text mode column to show Duration in Days on your Assignment Report. The expression is taking the actual duration (in minutes) and dividing that by 480 (how many minutes in an 8 hour work day) to calculate the number of days. So instead of seeing 4 hours you'll see 0.5 or 2 weeks will show as 10. If that wasn't exactly what you were looking for, just let me know!
displayname=Duration in Days
textmode=true
valueexpression=DIV({task}.{durationMinutes},480)
valueformat=HTML
This is very similar to something I was looking for as well, thank you! Is there a way to also show a sum of the days (or hours, in my case)? When I tried adding your code and tweaked the aggregator lines, it ended up removing the sum altogether, but if I leave it alone it's reporting the sum in minutes.
Views
Replies
Total Likes
If you have a grouping added to your report, you can add the following aggregator to your column. Although if your calculation is in hours vs days, you will need to swap out the line for valueexpression to match:
aggregator.function=SUM
aggregator.valueexpression=DIV({task}.{durationMinutes},480)
aggregator.valueformat=HTML
Let me know if you run into any issues!
This worked perfectly -- thank you!
Views
Replies
Total Likes
Views
Likes
Replies