How to script with overall Max/min

Hi guys.

I would appreciate some help from you. For days that I have been trying to solve this and can't.

My mappings contains:
"date": { "type": "date"},
"name": "{ "type": "keyword" },
"tickets": { "type": "flat"}

I need to find the TOP 10 events (by "name") in which the average tickets selling have grown.
I woundered that by knowing the overall Max and the Overall Min I could make all the values to percentage, then by tracing the derivative I would know the change.

My problem is that I don't know how to make this script. When I do the aggregations I can have all the values shown on the plot, but am unable to make the calculation.

thanks

Hey @Guilherme_Silveira does the following give you what you're looking for?

HI @Brandon_Kobel thanks for answering me.
It actually helped a lot, but it is not what I am searching for.
The aggregation you have given me is very nice to know every event during time, but lacks:

  • Ordenation by the greatest variation
  • Abstraction to the amount of tickets sold (by absolute value) and show in percentage to the overall max

At last, the idea is to know which shows have start selling more tickets, but the reference must only be the show itself. For example, there are shows, one sold a max of 100 tickets, and other 50, if the last in everage sell 20 and last week it sold 30 per day I need to be shown this one if the first show is selling as average.

I think I could do it by programming, but I don't know where can I do it on Kibana and I am evading the need to other platform.

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