Aggregation query in templatle variables filters

I would like to get a max value from a property of elastic index.
Something like I could do in SQL: “select max(some_property) from some_index”
How can I do this in query of template variables?

  • What Grafana version and what operating system are you using?

  • What are you trying to achieve?

  • How are you trying to achieve it?

  • What happened?

  • What did you expect to happen?

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

  • Did you follow any online instructions? If so, what is the URL?