What is a Metric?
A metric is an individual visualization or KPI that displays data from your connected data sources. Metrics are the building blocks of dashboards - they can be charts, tables, single-value cards, or other visual representations of your data.Types of Metrics
Charts
Bar, line, pie, area, scatter, and more
Tables
Data grids with sorting and pagination
Single Values
KPIs with trend indicators
Gauges
Progress and goal tracking
Heatmaps
Density and correlation views
Geo Maps
Location-based visualizations
Creating Metrics
DataBrain offers multiple ways to create metrics:Visual Builder
Drag-and-drop interface for building metrics without SQL. Select dimensions, measures, and apply transformations visually.Custom SQL
Write your own SQL queries for complete control over the data. Perfect for complex transformations and calculations.AI Chat Mode
Describe what you want in natural language, and let AI generate the metric for you. “Show me revenue by region for the last quarter”Create a Metric
Step-by-step guide to creating metrics
Metric Components
Dimensions
Categories or attributes used for grouping data (e.g., region, product, date).Measures
Numeric values you want to analyze (e.g., revenue, count, average).Filters
Conditions to limit the data displayed in the metric.Aggregations
Mathematical operations applied to measures (sum, average, count, min, max).Chart Types
DataBrain supports 20+ chart types:- Bar Chart - Compare values across categories
- Line Chart - Show trends over time
- Pie Chart - Display proportions
- Area Chart - Visualize cumulative trends
- Scatter Plot - Show correlations
Metric Filters
Add filters to control what data appears in your metric:Variable Filters
Dynamic filters that users can modify. Great for interactive dashboards.Static Filters
Fixed conditions applied to the metric query. Users cannot change these.Custom SQL Filters
Advanced filtering using custom SQL expressions.Apply Metric Filters
Learn about metric filtering options
Customization & Styling
Chart Appearance
- Colors and palettes
- Fonts and text sizing
- Axis labels and formatting
- Legend position
- Grid lines and ticks
Table Options
- Column alignment
- Conditional formatting
- Row highlighting
- Font customization
- Auto-pagination
Single Value Cards
- Metric expressions
- Trend indicators
- Sparklines
- Comparison values
Chart Appearance
Customize chart styling and appearance
Metric Actions
Configure what happens when users interact with your metrics:Click Actions
- Drill down to detailed data
- Navigate to other dashboards
- Open custom URLs
- Apply filters to other metrics
Drill Down
Create hierarchical exploration paths. Click on a region to see cities, click a city to see stores.Cross-Dashboard Drill Down
Navigate to related dashboards while preserving filter context.Chart Actions
Configure interactive chart actions
Advanced Features
Custom Columns
Create calculated fields using formulas and functions. No SQL required.Metric Expressions
Build complex KPIs with custom expressions for single-value cards.AI Summary
Generate natural language summaries of metric data automatically.Dynamic Properties
Create conditional formatting and styling based on data values.Dynamic Properties
Add conditional formatting to metrics
Metric Management
Organize Metrics
- Archive unused metrics
- Tag and categorize
- Search and filter
- View unpublished drafts
Share & Export
- Download as images (PNG, JPEG)
- Export underlying data (CSV, Excel)
- Share specific metrics
- Embed individual metrics
Version Control
- Track metric changes
- Restore previous versions
- View edit history
Edit a Metric
Learn how to edit and manage metrics
Embedding Metrics
Embed individual metrics into your application:- Custom styling
- Event handlers
- Responsive sizing
- Filter controls
Embed Metrics
Developer guide for embedding metrics
Best Practices
Choose the Right Chart Type
Choose the Right Chart Type
Match your chart type to your data and message. Use bars for comparisons, lines for trends, pies for proportions.
Keep It Simple
Keep It Simple
Don’t overcrowd charts. Focus on the key message and remove unnecessary elements.
Use Meaningful Titles
Use Meaningful Titles
Write clear, descriptive titles that tell users what they’re looking at.
Add Context
Add Context
Include footnotes, descriptions, and tooltips to help users interpret the data.
Optimize Performance
Optimize Performance
Limit data points, use aggregations, and apply filters to keep queries fast.
Performance Tips
- Use Aggregations - Pre-aggregate data in your queries
- Apply Filters - Limit the data range with date filters
- Leverage Caching - Enable query result caching
- Optimize SQL - Write efficient custom SQL queries
- Limit Rows - Set reasonable row limits for tables