Databrain home page
Search...
⌘K
Embed Playground
Start Building
Start Building
Search...
Navigation
Apply Metric Filter
Metric Filter - Custom
Docs
Guides
API Reference
Changelog
About us
Blog
What is Databrain?
Onboarding & Configuration
Sign-Up
Sign-In
Google Sign In Setup for Self-hosted app
Forgot password? Recover your Databrain Account
Onboarding
Add a Data Source
Configure Tenants
Create a Workspace
Create a Private Worskpace
Create a Dashboard
Create a Metric
Workspace Settings
Explore Data
Datasources
Connecting Data Sources to Databrain
Allow Access to our IP
Add a Data Source
Configure Tenants
How to Sync a Data Source
Edit tenancy
Create a datamart
Semantic layer
Create a data App
Creating a Custom Dataset/View in a Multi-Datasource Environment
Workspace
Multi Datasource Workspace
Dashboards
Edit a Dashboard
Share Dashboard
Dashboard Settings
Create/Modify Dashboard Filter
Customize Layout
Adding Elements to Dashboard
Import/Export Dashboard
Report Scheduler
Metric
Edit a Metric
Joins , Filter, Sort, Group By
Complex Filter
Apply Metric Filter
Overview
Metric Filter - Variable
Metric Filter - Custom
Switch X axis and Switch Y axis
Group By
Footnote and Long Description
Dynamic Property
Archive/Unarchive Metric Card
Download Metric Card
Download Underlying Data
Metric Summary
Metric Expression for Single Value Card
AI Summary
Merge Metrics
Section Filters
View Unpublished Metrics
Visualizations - Actions & Appearance
Chart Actions
Chart Appearance
Preview of Dashboards
Email Settings for Scheduled Reports
Scheduled Reports for End User
Filters
Dashboard Filter
Metric Filter
App Filter
Features
Python Editor Console
Custom SQL Console
Custom SQL Query Guidelines
Integrating Plugin
Get an auth token
Get a guest token
Themeing & Customization
Creating a theme
View the theme in action
METRIC COMPONENT (UPTO VERSION V0.11.15)
Quick start
Web Components
Quick start
Framework Specific Guide
On this page
Create a Metric Filter
Write a Custom SQL Query
Mention the Alias in the Option
Navigate to “Apply On” Section
Assign Variable Name
Example Custom SQL Query with Variable Filter
Apply Metric Filter
Metric Filter - Custom
Copy page
Create a Custom Dashboard/Metric Filter: Quick Instruction Manual
Copy page
Create a Metric Filter
Begin by creating a new metric filter within your dashboard.
Write a Custom SQL Query
Create a SQL query to retrieve the data you need for dropdown options. For example:
Mention the Alias in the Option
In your filter options, refer to the alias
countryname
that you used in your SQL query.
Navigate to “Apply On” Section
Go to the “Apply On” section of the dashboard filter settings.
Assign Variable Name
Assign a variable name, for example,
{{value}}
.
Copy the variable
{{value}}
for use in your custom SQL query.
Example Custom SQL Query with Variable Filter
1.Write Your Custom SQL: Start by writing a basic SQL query without the filter.
2.Integrate the Variable Filter: Modify your SQL to include the variable filter.
3.Resulting SQL Generated: The resulting SQL generated by the system will incorporate your variable filter in the final output.
Metric Filter - Variable
Switch X axis and Switch Y axis
Assistant
Responses are generated using AI and may contain mistakes.