I was wondering whether it is possible to create a scripted field that can query the top hit (last value) for each unique value of
product and then sum that so it can be used for graphing in Kibana?
Basically I have a range of products and some companies that spend X amount of money on various products. The total amount spent on each product is delivered in .csv format every day, hence I need to find the latest value first.
The idea is that if I can sum up the last values for each product in a single value, I can then apply a term (company name) and data histrogram (per month) to get the total cost for each company per month and plot that out to easily spot trends.