I have some time series data with revenue metrics and country codes on it.
I want to plot a time series linechart with revenue per day, for top 5 countries.
To do this, I create a visualization with sum revenue on Y axis, and then create buckets for X-axis with Date Histogram. Then I create sub-bucket aggregation based on country.keyword.
But I do not get top 5 countries for the whole period. I get top 5 countries for each day, and more than 5 countries end up on my chart:
How do I split my series not by top 5 countries with highest revenue for each day, but by top 5 countries with highest revenue for the whole time period selected?