Creating a Metric Filter in DataBrain
To add a filter to a specific metric card, navigate to the create/update metric page. Click on the ”+” sign located below the icons for grouping, sorting, and funneling. This process will initiate the setup for applying a filter directly to an individual metric card.Setup Process:
The setup for a metric filter follows the same guidelines as setting up a dashboard filter, with the primary difference being the scope of application—here, the filter is applied to a single metric card instead of the entire dashboard.Customizations Based on Datatype:
- Filter Variant: Choose from single select, multi-select, or search options to define how users interact with the filter.
- Select Default Value: Optionally auto-select a default value based on the datatype, or allow manual selection.
- Scope to Client: Ensure filter options are tailored based on the client, making them relevant to the specific data context.
- Label Column Setup: Set up a label column to display descriptive labels for the values being filtered, enhancing user understanding.
- Dependent Filters: Create dependencies between filters, such as linking a ‘State’ filter to a ‘Country’ filter, to maintain contextual relevance.
Applying the Filter:
Choose how to implement the filter on the metric card:- Direct Apply: Apply the filter directly to the metric card for immediate effect.
- Variable for Custom SQL: Use a variable from the filter setup in your custom SQL queries for more tailored interactions within the metric.
Metric Filter - Variable
For a detailed guide on how to use Variable Apply for metric filters.
- Custom SQL: Write custom SQL directly, specifying conditions in the WHERE clause to integrate the filter into data queries.
Metric Filter - Custom
For a detailed guide on applying metric filters using Custom SQL.