Aggregate diff video views


We have created an index that saves timestamp, entry_id & video views.
We sample the video view from a website, and saves it as is into the ES (that is, the current views value, not the diff).

Now, we want to tell how many video views we had in specific entries, daily, in the last 30 days. so what we do is that we sum all maxes per day per entry and substract sum of all minimums, per day.
Problem is, that we don't really know what was before the last 30 days, so we cannot rely on an entry showing 1000 views while it may have 800 in day 31 (outside our window), causing us to sum 1000 views and not 200.

What is the best approach to calculate this?

Many thanks

Could you provide a clear example of what data you have and what you are trying to calculate?

I want to show daily video views. But I am not inserting relative views to the ES, but growing metrics..

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.