Referencing a filter value in your query or dashboard can be a great way to improve interactivity within Omni. For example:
-
Explicitly highlight filter values on a dashboard: Highlight how dashboard filters are interacting to make it clear for less techncial users.
-
Create “linked” dashboards: Set up dynamic links on fields that will carry filters from one dashboard to the next. For example, transfer the “Country” filter value from an Orders Overview table to an Order Items Lookup table:
How to implement this
Syntax for filter parameters
You can use mustache syntax to reference filters as parameters in your model file or in markdown. The syntax looks like this:
{{ filters.[view_name].[filter_name].value }}
For example, in the image #1 above, the markdown powering that tile looks like this:
This dashboard is analyzing orders in {{filters.users.state.value}} within the {{filters.users.country.value}}.
Using your filters to link between dashboards
With the syntax above, you can insert a filter value into a link in your model file and transfer a filter value from one dashboard to another, as in example #2 above. To do this, you can follow our documentation and see more context in this Community article. Instead of adding a reference to an existing field (e.g. ${users.country}), you’ll add a reference to a filter (e.g. {{filters.users.country.value}}).
In example #2 above, the model definition for the id
field looks like this:
Note: If you insert a filter reference into your dashboard link, but there is no filter applied, the link will still work — it’ll just take you to the dashboard without the filter applied.