# Kibana - URL filtering

**URL:** <https://discuss.elastic.co/t/kibana-url-filtering/157861>\
**Category:** Kibana\
**Created:** [November 22, 2018, 10:48am UTC](https://discuss.elastic.co/t/kibana-url-filtering/157861 "2018-11-22T10:48:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jtebbens](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jtebbens](https://discuss.elastic.co/u/jtebbens)\
**Post date:** [November 22, 2018, 10:48am UTC](https://discuss.elastic.co/t/kibana-url-filtering/157861/1 "2018-11-22T10:48:49Z")

</div>

Hi all,

I am using URL links below to browse through several dashboards. On a main dashboard I define a "customer id" which I pin to the global filter. When I click on a link without any filter but just another dashboard it keeps the filter pinned. But when I use a link like example below it will strip the preset filter (ie customer\_id) and only selects the element\_name I click from a VB table Panel url with {{key}} as a parameter and the customer filter is gone (even when pinned).

Question, is there a way to keep the active filter like customer\_id as is and apply an additional filter like ci\_name or element\_name (cpu, memory, interfaces). Reason asking is without customer\_id you would end up with _any_ interface named "FastEthernet0/0" which could exist on several customers network devices.

kibana#/dashboard/?\_g=(description:'',filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:b28d2560-c210-11e8-81ef-b15d4ea8e3f2,key:element\_name,negate:!f),query:(match:(element\_name:(query:'{{key}}',type:phrase))))),fullScreenMode:!f,options:(darkTheme:!f,hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:''),timeRestore:!f,title:'',viewMode:view)

---

<div class="post-metadata">

**Author:** ![jtebbens](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jtebbens](https://discuss.elastic.co/u/jtebbens)\
**Post date:** [December 10, 2018, 2:02pm UTC](https://discuss.elastic.co/t/kibana-url-filtering/157861/2 "2018-12-10T14:02:14Z")

</div>

Anyone some guidance on how to do this?

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [December 10, 2018, 11:36pm UTC](https://discuss.elastic.co/t/kibana-url-filtering/157861/3 "2018-12-10T23:36:58Z")

</div>

> But when I use a link like example below it will strip the preset filter (ie customer\_id) and only selects the element\_name I click from a VB table Panel url with {{key}} as a parameter and the customer filter is gone (even when pinned).

The reason for this is because the filter is stored as part of the URL, and when you click on the link in the markdown, you're effectively completely resetting the application state to whatever is in that link (in your case, something _without_ that pinned filter).

I think what you're looking for is a way to make the links in your markdown a little more dynamic. For example, having it dynamically preserve the pinned filter on the `customer_id` field, if one exists. Unfortunately, there's no way to do that in the markdown vis in Kibana, the values in there are all static (which again, is why you are losing the pinned filter in the app state).

I'm not really experienced with it, but the markdown vis in the Visual Builder supports Handlebars syntax, meaning you can substitute values in that way. However, I don't think you can use anything from the app state to pick those values, so that's probably a dead end too.

Ultimately, what you need is a way for your users to quickly filter the data in the dashboard based on some values in a given field in the index. The "Controls" vis might be a good choice for that. It would allow you to add a dropdown to the dashboard, populated by values in a field (`customer_id` here), and when a users picks the value, it creates a filter. Something like this:

![Dec-10-2018%2016-36-18](https://us1.discourse-cdn.com/elastic/original/3X/5/a/5a4a8a67e394ac35c5cbe12642fa400eb687afd1.gif)

---

<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:** [January 7, 2019, 11:37pm UTC](https://discuss.elastic.co/t/kibana-url-filtering/157861/4 "2019-01-07T23:37:00Z")

</div>

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