Filters allow you to create dynamic, interactive dashboards that adapt to user selections and time ranges. They work at the dashboard level and automatically inject values into your chart queries, making it easy to explore different data slices without rewriting prompts.

How filters work

Filters are dashboard-level controls that automatically add variables to your chart queries. When you reference entities or time periods in your prompts, Basedash intelligently creates the appropriate filters and injects them into your SQL queries.

Automatic filter creation

Basedash automatically creates filters when you use certain language patterns in your prompts:
  • Entity references: “Show me details for a user” → Creates a user selector
  • Time references: “Revenue over time” → Creates date range filters
  • Aggregation references: “Group by category” → Creates grouping options

Filter types

Basedash supports six different filter types that you can use to create dynamic, interactive dashboards. Each type serves a specific purpose and provides different functionality.

Record filters

Record filters allow you to select specific records from your database tables. They’re perfect for entity-level dashboards where you want to focus on individual records. Features:
  • Dropdown selection from database records
  • Automatic population from your data source
  • Support for multiple values (optional)
  • Required/optional configuration
Common use cases:
  • User profile dashboards
  • Order detail pages
  • Customer account views
  • Product detail pages
Example:
Show me user details for a specific user

Text filters

Text filters provide free-form text input for string-based filtering and search functionality. Features:
  • Free text input
  • String matching and search
  • Case-sensitive and case-insensitive options
  • Support for partial matches
Common use cases:
  • Name searches
  • Email filtering
  • Description searches
  • Custom text-based filtering
Example:
Show me customers with names containing "John"

Number filters

Number filters handle numeric input for quantitative filtering and calculations. Features:
  • Numeric input validation
  • Range selection (min/max values)
  • Mathematical operations
  • Precision control
Common use cases:
  • Revenue thresholds
  • Age ranges
  • Price filtering
  • Quantity limits
Example:
Show me orders with total value greater than $100

Boolean filters

Boolean filters provide true/false or yes/no selection options for binary filtering. Features:
  • Toggle or checkbox interface
  • True/false selection
  • Default value configuration
  • Simple binary logic
Common use cases:
  • Active/inactive status
  • Feature flags
  • Subscription status
  • Binary classifications
Example:
Show me only active users

List filters

List filters provide predefined selection options from a curated list of values. Features:
  • Dropdown with predefined options
  • Single or multiple selection
  • Custom option lists
  • Static value management
Common use cases:
  • Category selection
  • Region filtering
  • Status selection
  • Department filtering
Example:
Show me sales by region (North, South, East, West)

SQL filters

SQL filters allow you to create custom SQL-based filtering logic for complex queries. Features:
  • Custom SQL query input
  • Advanced filtering logic
  • Dynamic query generation
  • Complex conditional logic
Common use cases:
  • Custom business logic
  • Complex filtering requirements
  • Dynamic query conditions
  • Advanced data manipulation
Example:
Show me users who meet custom criteria defined in SQL

Built-in filters

Basedash provides three built-in filters that are automatically available on all dashboards:

Start date

A date picker that allows users to select the beginning of a time range for analysis.

End date

A date picker that allows users to select the end of a time range for analysis.

Time interval

A dropdown that provides preset time intervals (e.g., daily, weekly, monthly) for consistent time-based analysis. These built-in filters are automatically created when you reference time-based analysis in your prompts and can be used across multiple charts on the same dashboard.

Filter configuration options

Multiple values

Enable “Allow multiple values” to let users select multiple options from list and record filters.

Required filters

Mark filters as “Required” to ensure they always have a value before queries execute.

Public dashboard visibility

Control whether filters appear on public dashboards with the “Show on public dashboard” option.

Default values

Set default values for filters to provide starting points for user interactions.

Automatic filter creation

Basedash automatically creates appropriate filter types when you use certain language patterns in your prompts:
  • Entity references: “Show me details for a user” → Creates a record filter
  • Time references: “Revenue over time” → Creates date range filters
  • Text searches: “Customers named John” → Creates text filters
  • Numeric thresholds: “Orders over $100” → Creates number filters
  • Boolean conditions: “Only active users” → Creates boolean filters
  • Category selections: “Sales by region” → Creates list filters

Using filters with chart types

Line charts

Show me user signups over time
  • Time filters: Automatically adds date range selection
  • Record filters: Can add user selection for specific user trends
  • Number filters: Can filter by thresholds (e.g., users with >10 logins)

Bar charts

Show me companies by user size
  • Record filters: Can add company selection for detailed views
  • List filters: Can filter by industry, region, or other categories
  • Boolean filters: Can show only active/inactive companies

Funnel charts

Show me user activation funnel
  • Time filters: Controls the time period for funnel analysis
  • Record filters: Can focus on specific user segments
  • Boolean filters: Can filter by user status or conditions

Activity charts

Show me user activity over time
  • Time filters: Controls the date range for the heatmap
  • Record filters: Can show activity for specific users
  • Number filters: Can filter by activity thresholds

Map visualizations

Show me website visitors by country
  • Time filters: Controls the time period for geographic data
  • List filters: Can filter by specific countries or regions
  • Text filters: Can search for specific locations

Detail views

Show me user details for a specific user
  • Record filters: Essential for selecting which user to display
  • Time filters: Can control related time-based metrics
  • Boolean filters: Can filter by user status or conditions

Tables

Show me customer data
  • Record filters: Can add customer selection
  • Time filters: Controls the time period for customer data
  • Text filters: Can search for specific customer names or emails
  • Number filters: Can filter by customer value or metrics

Number displays

Show me total revenue
  • Time filters: Controls the time period for revenue calculation
  • Record filters: Can show revenue for specific customers or segments
  • Number filters: Can set minimum/maximum revenue thresholds
  • Boolean filters: Can filter by active/inactive customers

Best practices

Use open-ended language

Instead of specific time periods, use open-ended language to leverage filters: Good:
Show me user signups over time
Avoid:
Show me user signups for the last 7 days

Reference other charts

Since Basedash AI understands your entire dashboard, you can reference other charts:
Show me the same data as the revenue chart but for a different time period

Leverage entity context

For entity-level dashboards, use entity-specific language:
Show me this user's order history
Show me this organization's performance metrics

Accessing and managing filters

Variables tab in code editor

You can view and manage all filters for a dashboard by going to the Variables tab within the full-screen code editor. This shows all filters with their current values and allows you to modify filter configurations.

Filter highlighting

When you hover over a filter on a dashboard, charts that use that filter will be highlighted, making it easy to see which charts are affected by each filter.

Applying filters to other charts

To apply an existing filter to another chart, simply tell the AI to update the chart to use the filter. For example:
Update this chart to use the same date range as the revenue chart
Apply the user filter from the activity chart to this chart
The AI will automatically understand which filters are applicable and update the chart accordingly.

Advanced features

Cross-chart filtering

Filters can affect multiple charts on the same dashboard, creating cohesive analysis experiences.

Dynamic variables

Filters can be used in calculated columns and external links:
Create a Stripe link for this user's customer ID

Filter dependencies

Filters can be linked together, where one filter’s selection affects the options available in another.