Create field based on calculated data

Dear reader,

I would like to do the following:

I get data ingested everyday with the following fields.(example)
Day 1

  • stock: 200
  • price: 10
    Day 2
  • stock 200
  • price: 10
    Day 1
  • stock: 200
  • price: 10
    Day 3
  • stock 190
  • price: 10

Etc etc

Now I would like to know the difference over a week of the stock. For example end of the week is 100 stock.

I would like a field weekly-sales: 100
Now I would like the calculate the revenue in a field. Weekly-sales: 100 times price: 10 = 1000

New field Revenue: 1000

How does this work in elastic?

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