# Query DSL

**URL:** https://discuss.elastic.co/t/query-dsl/254615
**Category:** Kibana
**Created:** [November 7, 2020, 2:53pm UTC](https://discuss.elastic.co/t/query-dsl/254615 "2020-11-07T14:53:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![peretz\_shlomi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/peretz_shlomi/32/54701_2.png) [@peretz\_shlomi](https://discuss.elastic.co/u/peretz_shlomi)
#### Post date: [November 7, 2020, 2:53pm UTC](https://discuss.elastic.co/t/query-dsl/254615/1 "2020-11-07T14:53:21Z")

</div>

hii

I want to make filter on visualization by query dsl

a need to make filter to visualization by last value who entered to one field (name : product name)

---

<div class="post-metadata">

### Author: ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)
#### Post date: [November 11, 2020, 3:43pm UTC](https://discuss.elastic.co/t/query-dsl/254615/2 "2020-11-11T15:43:48Z")

</div>

You might not need to type the query DSL to create this visualization. I think you have two options:

1. If you want to look at the "last value" in a visualization you can use the [Top Hits](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-top-hits-aggregation.html) function to fetch the most recent value of a field
2. If you really want to use the query DSL, then your only option is to author a [Vega](https://www.elastic.co/guide/en/kibana/current/vega-graph.html) visualization.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [December 9, 2020, 3:43pm UTC](https://discuss.elastic.co/t/query-dsl/254615/3 "2020-12-09T15:43:57Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
