def rolling_average(values, window):
    if window <= 0:
        raise ValueError("Window must be greater than 0")
    if window > len(values):
        return []
    result = []
    for i in range(len(values) - window + 1):
        window_values = values[i : i + window]
        avg = sum(window_values) / window
        result.append(avg)
    return result
