I want to use Elasticsearch and my idea is to access my SQL database and with a query join all the data that I have in my database. I solve this problem and now I am trying to do some visualizations.
x1, x2, x3
term1, 10, 56
term1, 20, 56
term1, 12, 56
term2, 10, 67
term2, 12, 67
I want to have the sum of x3 but only have 1 time the x3 value for x1, like:
To do this, I can use a sum bucket aggregation of x1 and calculate average of x3, for each x1.
Now, I want to sum x3 and have value 123 (56+67).
My problem is here! How can I do this?
Here is the metric aggregation I made: