Display the result of aggregating multiple calculated values in a grouping
-
Go to a task report, click Report Actions > Edit.
-
In the Groupings tab, click Add grouping, and start typing Project Name in the Group by field, then select Project > Name it when it displays in the list.
-
In the Columns(View) tab, click Add Column, then start typing Planned Hours in the Show in this column field, then select it when it displays in the list.
TIPAlways start adding as much information using the Standard interface before you edit information in text mode. Add fields that are closest to or contain the most amount of information that for the calculation you are trying to make. -
In the Summarize this column by field, select Sum.
-
Click Switch to Text Mode in the column you added, then click Edit Text Mode.
-
Replace the text in the box with the following text mode example:
valueformat=compound aggregator.displayformat=minutesAsHoursString aggregator.valueexpression=ROUND(({workRequired}-{actualWorkRequired}),2) aggregator.function=SUM aggregator.valueformat=val aggregator.namekey=workrequired linkedname=direct textmode=true valuefield=workRequired namekey=workrequired valueexpression=CONCAT(ROUND(({workRequired}-{actualWorkRequired})/60,2)," Hours") viewalias=workrequired displayname=Work Balance
TIPIn order to get the aggregated value in the grouping to display the aggregated difference between the Planned Hours and Actual Hours fields, input the same equation into theaggregator.valuefield
line. Theaggregator.displayformat
used for the Planned Hours column converts minutes to hours. Because the Planned Hours field was used as a placeholder, this line doesn’t need to be adjusted.TheminutesAsHoursString
definition of theaggregator.displayformat
line means there is no need to divide each field by 60 as done on thevalueexpression
for the results. In thisaggregator.valuefield=workRequired
becomes:aggregator.valueexpression=ROUND(({workRequired}-{actualWorkRequired}),2
.1. Click **Done**.
-
Click Save+Close.
recommendation-more-help