Aggregation function helps to sum the data based on Dimensions.
In a setanalysis expression, two sums cannot be used
so in your example
gives the sum of ( sum of maximum of LoggedOnTime based on dimension AgentName)
Hope that helps