# How to get values of filters to a variable in Canvas

**URL:** <https://discuss.elastic.co/t/how-to-get-values-of-filters-to-a-variable-in-canvas/341216>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [August 21, 2023, 9:24am UTC](https://discuss.elastic.co/t/how-to-get-values-of-filters-to-a-variable-in-canvas/341216 "2023-08-21T09:24:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KLM](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@KLM](https://discuss.elastic.co/u/KLM)\
**Post date:** [August 21, 2023, 9:24am UTC](https://discuss.elastic.co/t/how-to-get-values-of-filters-to-a-variable-in-canvas/341216/1 "2023-08-21T09:24:41Z")

</div>

I have set of filters on the canvas and values of these will be used in an essql query to pick data to a line chart.

```auto
filters 
| essql query="SELECT .."
..
..
| render

```

But based on some of the selected values in filters, I want to change the essql query to be used to pick the data for chart. So that how can I read the values selected in filters and save them in a variable.

---

<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:** [September 18, 2023, 9:25am UTC](https://discuss.elastic.co/t/how-to-get-values-of-filters-to-a-variable-in-canvas/341216/2 "2023-09-18T09:25:00Z")

</div>

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