# Top N - how to link to dashboard with filter instead of query

**URL:** https://discuss.elastic.co/t/top-n-how-to-link-to-dashboard-with-filter-instead-of-query/141687
**Category:** Kibana
**Created:** [July 26, 2018, 4:15am UTC](https://discuss.elastic.co/t/top-n-how-to-link-to-dashboard-with-filter-instead-of-query/141687 "2018-07-26T04:15:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![derentis](https://avatars.discourse-cdn.com/v4/letter/d/e99b99/32.png) [@derentis](https://discuss.elastic.co/u/derentis)
#### Post date: [July 26, 2018, 4:15am UTC](https://discuss.elastic.co/t/top-n-how-to-link-to-dashboard-with-filter-instead-of-query/141687/1 "2018-07-26T04:15:17Z")

</div>

I have a customized Systems Overview dashboard for Beats data, and I wanted it to link to a Host Details dashboard by drilling down not by query, because query doesn't correctly filter some of the visualizations, but by filter from the Top N visualizations on the page.

I've been trying to work this out for a while and couldn't find reliable help instructions anywhere through searching, so I picked apart a URL to figure it out.

I thought I'd share since I'm sure someone else out there would like to use this.

When editing a Top N visualization and navigating to Item Url, you can define a URL and it can use {{key}} so if your Top N viz is by beat.hostname, you can use the following URL.

Just two parts of the string to replace with your own details (_ **REPLACEWithYourDesiredDashboardIDENTIFIER** _ and _ **REPLACEWithYourIndexNUMBER** _).

**Item Url:**

../app/kibana#/dashboard/REPLACEWithYourDesiredDashboardIDENTIFIER?\_a=(description:'',filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'REPLACEWithYourIndexNUMBER',key:beat.hostname,negate:!f,params:(query:{{key}},type:phrase),type:phrase,value:{{key}}),query:(match:(beat.hostname:(query:{{key}},type:phrase))))))

If all you want to do is link by query, you can use this:  
../app/kibana#/dashboard/REPLACEWithYourDesiredDashboardIDENTIFIER?\_a=(query:(query\_string:(analyze\_wildcard:!t,query:'beat.hostname:"{{key}}"')))

---

<div class="post-metadata">

### Author: ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)
#### Post date: [July 26, 2018, 6:54pm UTC](https://discuss.elastic.co/t/top-n-how-to-link-to-dashboard-with-filter-instead-of-query/141687/2 "2018-07-26T18:54:34Z")

</div>

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 23, 2018, 6:54pm UTC](https://discuss.elastic.co/t/top-n-how-to-link-to-dashboard-with-filter-instead-of-query/141687/3 "2018-08-23T18:54:46Z")

</div>

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