# How to pass parameter filter from dashboard to Visualize Kibana

**URL:** <https://discuss.elastic.co/t/how-to-pass-parameter-filter-from-dashboard-to-visualize-kibana/279948>\
**Category:** Kibana\
**Created:** [July 29, 2021, 7:40am UTC](https://discuss.elastic.co/t/how-to-pass-parameter-filter-from-dashboard-to-visualize-kibana/279948 "2021-07-29T07:40:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![HuongCV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/huongcv/32/83849_2.png) [@HuongCV](https://discuss.elastic.co/u/HuongCV)\
**Post date:** [July 29, 2021, 7:40am UTC](https://discuss.elastic.co/t/how-to-pass-parameter-filter-from-dashboard-to-visualize-kibana/279948/1 "2021-07-29T07:40:04Z")

</div>

Hi all,  
In Dashboard, I have range filter: confirmation\_year from A year to B year.  
In Elastic have field dead\_year.  
In metric Visualize , I want to count documents that satisfy the condition: 'dead\_year' less than or equal to B year. And change  
filter in dashboard (B year) then metric Visualize also change  
Thanks all

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/c/1c6e8097b3d20450478225dbb7393aaa595a37ff.png)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/c/1cf84e67d6b114a2bc67fe7cf7f08565f8c3e354.png)

---

<div class="post-metadata">

**Author:** ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)\
**Post date:** [July 29, 2021, 8:17am UTC](https://discuss.elastic.co/t/how-to-pass-parameter-filter-from-dashboard-to-visualize-kibana/279948/2 "2021-07-29T08:17:20Z")

</div>

Welcome to the community @HuongCV!

You could use lens to create `Count of records` visualization - simply drag `Records` field to the workspace and choose `metric` from chart switcher. (you can also use metric from Visualize library)

The filters on the dashboard will be applied to your visualization automatically.

---

<div class="post-metadata">

**Author:** ![HuongCV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/huongcv/32/83849_2.png) [@HuongCV](https://discuss.elastic.co/u/HuongCV)\
**Post date:** [July 30, 2021, 3:54am UTC](https://discuss.elastic.co/t/how-to-pass-parameter-filter-from-dashboard-to-visualize-kibana/279948/3 "2021-07-30T03:54:42Z")

</div>

Hi @Marta_Bondyra ,  
Thanks for your reply. You misunderstand me. I want to: dashboard filter by range of field 'confirmation\_year' (year A to year B), but in metric visualization want filter by 'dead\_year' less than or equal to B year and filter 'dead\_year' not in dashboard. This mean how to filter on visualization get the parameter (year B) from filter on dashboard.  
Thanks

---

<div class="post-metadata">

**Author:** ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)\
**Post date:** [July 30, 2021, 7:16am UTC](https://discuss.elastic.co/t/how-to-pass-parameter-filter-from-dashboard-to-visualize-kibana/279948/4 "2021-07-30T07:16:13Z")

</div>

Ok, I see, so you want to make use range control to filter by different fields depends on the visualization. (for Visualize metric control `dead_year` and for the rest `confirmation_year`?  
I don't think it is possible unfortunately.

You could use TSVB metric and check the `ignore global filter` option and add a custom filter about `dead_year` but that wouldn't allow you to control it from range control.

 ![Screenshot 2021-07-30 at 09.15.22](https://us1.discourse-cdn.com/elastic/original/3X/6/f/6f6dc15b8c0043c623963b50dcf01aae4cd34ff2.png)

---

<div class="post-metadata">

**Author:** ![HuongCV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/huongcv/32/83849_2.png) [@HuongCV](https://discuss.elastic.co/u/HuongCV)\
**Post date:** [July 30, 2021, 9:46am UTC](https://discuss.elastic.co/t/how-to-pass-parameter-filter-from-dashboard-to-visualize-kibana/279948/5 "2021-07-30T09:46:51Z")

</div>

Hi @Marta_Bondyra  
I still want to global filter. My problem is how to get it parameter (year B) of filter range `confirmation_year` to apply filter `dead_year` less than or equal to B year in metric visualization.  
Thanks

---

<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:** [August 27, 2021, 9:47am UTC](https://discuss.elastic.co/t/how-to-pass-parameter-filter-from-dashboard-to-visualize-kibana/279948/6 "2021-08-27T09:47:05Z")

</div>

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