you could store the cumulated value in persistence store or you could iterate over the values fetched from the persistence store for a certain amount of time.