Unfortunately, this isn't currently possible in Visualize. You can't express that type of "WHERE" clause to limit on a subaggregation. There's something similar in our metric agg, called Top Hit, which you can use to retrieve the last timestamp for a given term, but that isn't usable as a filter.
If you'd like to this kind of functionality added to Kibana, could you file a request on GitHub? Thanks!
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.