However, when I try to do the same with my index, I get an error when I try to calculate the average of it. The first aggregation part is the one creating the problem for me. When I remove that part I have my chart but its not calculating average, its giving every value.
I would try doing a project transform first to remove all the _source requirement from the fields then the rest of the visualization should work just like the demo. What that is doing is essentially just renaming the field to drop the _source.
You want to filter before aggregating. If not the filter fields won't be there after you aggregate. Transforms are from top to bottom so they process in that order.
Also I think you want to remove Japan. If not then you are only left with Japan which won't work. To write that you would change the == to != like I did above.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.