get min/max values from dataset