Filters allow users to interactively control the data displayed in your Intelligent App dashboards. They are linked to variables and can be referenced in SQL queries to dynamically filter results.Documentation Index
Fetch the complete documentation index at: https://docs.datazone.co/llms.txt
Use this file to discover all available pages before exploring further.
Filter Types
Datazone supports several filter types:| Type | Description |
|---|---|
text | Free text input |
number | Numeric input |
dropdown | Select from a list of options |
date | Date picker |
Filter Configuration
Each filter is defined in thecomponents.filters section of your YAML configuration. Key properties:
type: The filter type (text,number,dropdown,date)name: Unique filter nametitle: Label shown to usersaffected_variable: The variable this filter updatesdefault_value: (Optional) Default valueoptions: (For dropdown) Static or SQL-driven optionsmultiple: (Optional, dropdown only) Enable multi-select functionality (default:false)placeholder: (Optional) Placeholder text
Example: Static Dropdown Filter
Example: SQL-Driven Dropdown Filter
Example: Date and Number Filters
Using Filters in Queries
Filters update variables, which you can reference in your chart queries using double curly braces:Multi-Select Dropdown Filters
Dropdown filters support multi-select functionality by settingmultiple: true. This allows users to select multiple values from the dropdown list simultaneously.
Configuration Example
Using Multi-Select Values in Queries
Whenmultiple: true is enabled, the variable will contain an array of selected values. Use Jinja’s join filter to format these values for SQL queries:
- When users select
['North', 'South'], the Jinja template transforms it to:'North','South' - The final SQL becomes:
AND CustomerRegion IN ('North','South') - If no values are selected, the condition is skipped entirely
Multi-Select with SQL-Driven Options
You can also use SQL queries to populate multi-select dropdowns:Filter Dependencies
Filters can depend on other filters to create cascading filter effects. When one filter changes, dependent filters can update their options based on the selected value. This is particularly useful for hierarchical data like country/city relationships.Example: Country and City Filters
In this example, the city filter’s options are limited based on the selected country:Key Points for Filter Dependencies
- Use conditional logic with
{% if variable_name is defined %}to check if a filter value exists - Always include a fallback condition (like
WHERE 1=1) to ensure valid SQL when no filters are applied - Dependent filters will automatically refresh when their parent filter changes
- You can chain multiple levels of dependencies (e.g., country → state → city)
Best Practices
- Use descriptive titles and placeholders for better UX
- Use SQL-driven dropdowns for dynamic option lists
- Set sensible defaults to improve initial dashboard state
- Group filters logically on tabs for clarity