Comparing two arbitrary days with each other in a time series

Say I have an index with a dataset of all purchases done on an e-commerce site. For Black Friday, which falls on a different date of the month each year, I want to be able to compare how sales are this year compared to last year on Black Friday.

My initial instinct was to turn to timelion with an offset (e.g. make a sum of the sales amount, then do an offset of -1Y of the sum of sales). This actually give the exact graph I want - except for the tiny problem of the dates not being correct.

Is this solvable by Timelion, or some other component of Kibana? Maybe by some plugin?

Dream scenario would be to be able to choose two dates, and compare (in my case) sum of sales amount per hour in a graph.

(we solved it this year in a rather hacky way; indexing last years Black Friday sales (which fell on the 24th of November) into this years October 23rd, in order to do a timelion offset of exactly -1M -- but this only really worked because we had an empty index, and only really bothered about Black Friday)

There's kind of an unintuitive way to accomplish this.

  1. Create a new index pattern for your indices, but make sure to choose "I don't want to use the Time Filter"
  2. Create a bar chart visualization, then add a filter where your timestamp field is between 2018-11-23 and 2018-11-24
  3. Create another bar chart visualization, then add a filter where your timestamp field is between 2017-11-24 and 2017-11-25
  4. Add both visualizations to a dashboard

Here's an example:

Another option if you want them on the same graph, and simply want 1 day compared to each other, you can create a single graph with 2 filters.

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