add ability to use mean of the last N datapoints as the last value for average and percentile checks