[BZ 1092756] fix calculation of aggregate metrics

The max value for aggregate metrics could get computed incorrectly as a result
of an if else statement that should have been an if statement. The error
manifests itself only for 6 and 24 hour data. It would occur only when the min
and the max fall on the same data point.