Expand my Community achievements bar.

Latest Community Ideas Review is Out: Discover What’s New and What to Expect!

how to make assignment duration report show count of "days" only (not hours, weeks)

Avatar

Level 4

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?

4 Replies

Avatar

Employee Advisor

@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

Avatar

Level 1

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.

Avatar

Employee Advisor

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!