# Dashboard Tabs Preserving Filter Selection

**URL:** <https://community.omni.co/t/dashboard-tabs-preserving-filter-selection/221>\
**Category:** Patterns\
**Tags:** dashboards, filtering, modeling\
**Created:** [January 28, 2025, 4:59pm UTC](https://community.omni.co/t/dashboard-tabs-preserving-filter-selection/221 "2025-01-28T16:59:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![russ](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.omni.co/russ/32/296_2.png) [@russ](https://community.omni.co/u/russ)\
**Post date:** [January 28, 2025, 4:59pm UTC](https://community.omni.co/t/dashboard-tabs-preserving-filter-selection/221/1 "2025-01-28T16:59:09Z")

</div>

If you’re migrating to Omni from a product that has tabbed dashboards, you may have wished you could make a filter selection on one tab and apply those same filters across other tabs. You can! Using our markdown visualization, you can make each tab link dynamic, carrying all of it’s filter arguments to the next.

**NOTE:** that although the instructions below are still correct and relevant, our newly implemented support of multiple filters on the same field requires the filter to be referenced in step 3 like this in the query:

`f--FILTER_ID{{filters.FIELD_NAME.json}}`

Watch this short video to see it in action:

[ 

Dashboard A (Dashboard) — Omni Analytics - 28 January 2025 - Watch Video

 ](https://www.loom.com/share/dacc14ac7a004a328d4670ce03b09550)[![](https://canada1.discourse-cdn.com/flex004/uploads/omni/original/1X/f9f8911d818c74e2ec687551eacd645ec05d3ace.gif) ](https://www.loom.com/share/dacc14ac7a004a328d4670ce03b09550)

Walkthrough with code samples:

> **Step 1) Have 2 or more dashboards with a common filter (or filters) and get their urls**
>
> collect the location and the url arguments, but not their json values
> 
> ![dashboardURLwith argument](https://canada1.discourse-cdn.com/flex004/uploads/omni/original/1X/113cd616966a809d85acb9051b77f004336d7a0f.png)
> 
> in the case of multiple filters, you may want to save them in a text editor like this:
> 
> ```auto
> myinstance.omniapp.co/dashboards/mydashboard1?account.billing_state=XXX&account.billling_zip=YYY
> myinstance.omniapp.co/dashboards/mydashboard2?account.billing_state=XXX&account.billling_zip=YYY
> 
> ```

> **Step 2) Set up a 'stub query' in the workbook**
>
> Our markdown viz does expect a query, so create something simple that doesn’t do anything. In my case, I clicked +add field and selected 1. There are many ways of doing this / just want to satisfy having a field on the tab so we can proceed to step 2. The data here will not be used.
> 
> ![stubquery](https://canada1.discourse-cdn.com/flex004/uploads/omni/original/1X/c70826c4389706865d8876aa212cdf4a1b880127.png)

> **Step 3) Apply the markdown and place the urls and apply special mustache arg**
>
> On your stub query, click chart and then the markdown viz as shown:
> 
> ![Dynamic Dashboard Linking](https://canada1.discourse-cdn.com/flex004/uploads/omni/original/1X/778579c886295354276b1b022fe8517ded16b495.png)  
> You can start with this html, replacing the hrefs with your dashboards and changing the {{filters.account.billing\_state.json}} to your field which the dashboard filter will be applied upon.
> 
> ```html
> <style>
> .tabs { list-style: none; }
> .tabs li { display: inline; }
> .tabs li a { color: black; float: left; display: block; padding: 4px 10px; margin-left: -1px; position: relative; left: 1px; background: white; text-decoration: none; }
> .tabs li a:hover { background: #ccc; }
> .cur-nav-fix .tabs { position: absolute; bottom: 100%; left: -1px; }
> .cur-nav-fix .tabs li a { 
> background: -webkit-linear-gradient(top, white, #eee); 
> background: -moz-linear-gradient(top, white, #eee); 
> background: -ms-linear-gradient(top, white, #eee); 
> background: -o-linear-gradient(top, white, #eee); 
> }
> #box-four { z-index: 1;}
> #box-four:target .tabs, #box-five:target .tabs, #box-six:target .tabs { z-index: 3; }
> .cur-nav-fix .tabs li.cur a { border-bottom: 1px solid white; background: white; }
> </style>
> <div id="box-four">
> <ul class="tabs group">
> <li><a href='https://russ.playground.exploreomni.dev/dashboards/_a?f--account.billing_state={{filters.account.billing_state.json}}'>Dashboard A</a></li>
> <li><a href='https://russ.playground.exploreomni.dev/dashboards/_b?f--account.billing_state={{filters.account.billing_state.json}}'>Dashboard B</a></li>
> </ul>
> </div>
> 
> ```

> **Step 4) copy or import the query to all the other dashboards in your tab scheme**
>
> You can either do the same procedure on each dashboard and copy paste the markdown, or use our “import tab” functionality which you can see the process for in our docs [Link to tab importing walkthrough](https://docs.omni.co/docs/querying-and-sql/workbook#moving-queries-between-workbooks)
