thx @Christian_Dahlqvist!
Other alternatives;
- when saving a visualization, the queries are saved with the visualization, so when you save the visualization and add it to a dashboard, the query remains applied to that visualization.
- use a Filters-aggregation and apply the filter there: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-filters-aggregation.html