How to Visualize a Metric. Difference Between Current Week and Last Week

Hello All,

I'm currently trying to visualize some data. Everyday at 6 am my data will be ingested into Elasticsearch. The data contains information like product titles, stock, prices etc etc. So everyday a new document will be ingested of the same products everyday.

Now i would like to visualize for example a metric that show the difference in stock of the current week and last week. Also it would be nice to visualize the top 20 most decreased count of stock for products.

  "_index": "test",
  "_type": "_doc",
  "_id": "eLo4c3IASD2Fj5FOcYO7",
  "_version": 1,
  "_score": null,
  "_source": {
    "URL": "",
    "Description": "Lorem ipsem, Lorem ipsem, ",
    "Product title": "Lorem ipsem, Lorem ipsem, Lorem ipsem",
    "Category": "Elektronica",
    "Rating": null,
    "@version": "1",
    "Stock": 10,
    "Price": "243.99",
    "@timestamp": "2020-06-02T04:09:38.339Z",
    "Sub Category": "Camera's & Accessoires>Studiofotografie>Achtergrondsystemen>Achtergronddoeken",
    "host": "localhost.localdomain",
    "Image": "",
    "EAN Number": "9234234010081018"
  "fields": {
    "@timestamp": [
  "sort": [

You can use TSVB to compare metrics between time periods

Great, thanks. Is it also possible the visualise the difference between for example current week and last week?

Yes. With TSVB, you can customize the offset to the require period.

Thanks for helping it's really nice also like the new control feature.

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