Metrics Documentation
Learn how to create, manage, and use metrics in Treeo to track performance, monitor KPIs, and make data-driven decisions across your organization.
Metrics Documentation
Metrics are a core feature in Treeo that enable data-driven decision making across your organization. This guide will walk you through everything you need to know about creating, managing, and using metrics effectively.
What are Metrics?
Metrics in Treeo are quantifiable measures that help you track performance, monitor progress, and make informed decisions. They can be used across various contexts within your workspace.
Think of metrics as your organization's vital signs - they give you real-time insights into what's working, what needs attention, and where opportunities lie.
Key Use Cases for Metrics
1. Chat Integration
You can mention metrics directly in chat conversations to ask questions and get instant insights about specific performance indicators.
Example Questions:
- "What's our current Customer Acquisition Cost?"
- "Show me the Monthly Recurring Revenue trend for Q3"
- "How does churn rate compare to last quarter?"
Simply reference the metric by name in your chat, and Treeo's AI will retrieve the latest data and provide context-aware analysis.
2. Team KPIs
Assign metrics to teams as Key Performance Indicators (KPIs) to align team goals with organizational objectives and track progress toward targets.
Benefits:
- Alignment: Ensure every team works toward company goals
- Visibility: Track progress in real-time dashboards
- Accountability: Clear ownership and expectations
- Motivation: Visual progress toward targets
3. Regular Tracking
Monitor metrics over time to identify trends, spot anomalies, and measure the impact of changes or initiatives.
Use Cases:
- Weekly executive reviews
- Monthly business reviews (MBRs)
- Quarterly board reporting
- Daily operational monitoring
Creating and Managing Metrics
Accessing the Metric Dictionary
The Metric Dictionary is your central repository for all organizational metrics.
- Click the menu icon (ā°) in the top right corner of your workspace
- Select Metric Dictionary from the dropdown menu
- You'll see a complete list of all metrics available in your workspace
The dictionary displays:
- Metric names and descriptions
- Last updated timestamps
- Owners and teams using each metric
- Quick actions (edit, delete, view details)
Adding a New Metric
Follow these steps to create a new metric:
- Open the Metric Dictionary (as described above)
- Click the Add Metric button in the top right
- Provide a clear, descriptive name for your metric
- Example: "Customer Acquisition Cost (CAC)"
- Use full names with abbreviations in parentheses
- Write a detailed description of what the metric measures
- What does it track?
- Why is it important?
- How should it be interpreted?
- Use the AI-powered SQL generation feature to automatically create the query based on your description
- Review and refine the generated SQL if needed
- Save your metric
Example Metric Creation
Name: Monthly Recurring Revenue (MRR)
Description:
Total predictable revenue from active subscriptions,
normalized to a monthly value. Includes all active
subscriptions regardless of billing frequency.
AI Prompt:
Calculate monthly recurring revenue by summing all active
subscription amounts. For annual subscriptions, divide by 12.
Only include subscriptions with status 'active'.
Generated SQL:
SELECT
date_trunc('month', date) AS period,
SUM(
CASE
WHEN billing_period = 'monthly' THEN amount
WHEN billing_period = 'annual' THEN amount / 12
ELSE 0
END
) AS mrr
FROM subscriptions
WHERE status = 'active'
GROUP BY 1
ORDER BY 1 DESC
AI-Powered SQL Generation
One of Treeo's most powerful features is the ability to generate metric SQL queries using AI. Simply describe what you want to measure in plain language, and the AI will translate your description into the appropriate SQL query. This makes metric creation accessible even if you're not familiar with SQL syntax.
How It Works
- Describe Your Metric: Write what you want to measure in plain English
- AI Analysis: The system analyzes your description and available data schema
- SQL Generation: Creates optimized SQL based on best practices
- Review & Edit: You can review and modify the generated query
- Validation: Test with sample data before saving
Tips for Better AI Generation
š” Tip: Be as specific as possible in your metric description to get the most accurate SQL generation. Include details about the data source, time period, filters, and calculations needed.
Good Description Examples:
ā "Calculate average order value by dividing total revenue by number of orders, grouped by month"
ā "Count unique active users who logged in at least once in the last 30 days"
ā "Sum of all closed-won deals in the pipeline, excluding deals marked as lost or pending"
Poor Description Examples:
ā "Revenue metric"
ā "User count"
ā "Sales stuff"
Updating Metrics
Metrics evolve as your business changes. Here's how to update them:
- Navigate to the Metric Dictionary
- Find the metric you want to modify (use search if needed)
- Click on the metric to open its details
- Make your changes to:
- Name
- Description
- SQL query
- Owner
- Tags or categories
- Save your updates
š Note: Changes to metric definitions are versioned. You can view the change history to see what was modified and when.
Deleting Metrics
Sometimes metrics become obsolete. Here's how to remove them:
- Open the Metric Dictionary
- Locate the metric you want to remove
- Click the delete option (trash icon or delete button)
- Review the impact (Treeo shows where the metric is used)
- Confirm the deletion
ā ļø Warning: Deleting a metric will remove it from all teams and dashboards where it's currently being used. Make sure to check dependencies before deleting.
Before Deleting
Ask yourself:
- Is this metric being used in any dashboards?
- Are any teams tracking this as a KPI?
- Is it referenced in scheduled reports?
- Could we archive it instead of deleting?
Alternative: Consider archiving metrics instead of deleting them to preserve historical data.
Advanced Metric Features
Best Practices
Naming Conventions
Do:
- ā Use clear, descriptive names: "Monthly Recurring Revenue (MRR)"
- ā Include units where relevant: "Average Order Value (USD)"
- ā Be consistent across similar metrics: "Daily Active Users", "Monthly Active Users"
Don't:
- ā Use vague names: "Metric 1", "Sales Stuff"
- ā Create duplicates with slightly different names
- ā Use internal jargon without explanation
Documentation
Use clear naming conventions: Choose metric names that clearly communicate what is being measured
Document your metrics: Include comprehensive descriptions so team members understand the context and calculation method
Every metric should include:
- Clear Definition: What exactly is being measured
- Business Context: Why this metric matters
- Calculation Method: How the number is derived
- Interpretation Guide: How to read the results
- Owner: Who maintains this metric
- Update Frequency: How often it refreshes
Governance
Review regularly: Periodically audit your metrics to ensure they remain relevant and accurate
Standardize across teams: Create a consistent set of metrics that can be used organization-wide for better comparability
Quarterly Metric Review:
- Are all metrics still relevant?
- Do calculations need updating?
- Are owners still appropriate?
- Can any metrics be consolidated?
- Are there new metrics needed?
Quality Assurance
Test before deployment: Validate your metric calculations with known data before rolling them out to teams
Testing Checklist:
- SQL query executes without errors
- Results match expected values for known periods
- Edge cases handled (null values, zeros, etc.)
- Performance is acceptable (< 30 seconds)
- Dimensions work correctly
Common Metric Examples
Revenue Metrics
Annual Recurring Revenue (ARR)
SELECT
SUM(mrr) * 12 AS arr
FROM (
SELECT
SUM(
CASE
WHEN billing_period = 'monthly' THEN amount
WHEN billing_period = 'annual' THEN amount / 12
END
) AS mrr
FROM subscriptions
WHERE status = 'active'
)
Customer Metrics
Net Promoter Score (NPS)
SELECT
((COUNT(CASE WHEN score >= 9 THEN 1 END) * 100.0 / COUNT(*)) -
(COUNT(CASE WHEN score <= 6 THEN 1 END) * 100.0 / COUNT(*))) AS nps
FROM customer_surveys
WHERE survey_date >= CURRENT_DATE - INTERVAL '30 days'
Engagement Metrics
Daily Active Users (DAU)
SELECT
date,
COUNT(DISTINCT user_id) AS dau
FROM user_events
WHERE event_type = 'login'
AND date >= CURRENT_DATE - INTERVAL '90 days'
GROUP BY date
ORDER BY date DESC
Getting Started
Ready to create your first metric? Follow these steps:
-
Identify what you need to measure
- What business question are you trying to answer?
- What data do you need to track?
-
Open the Metric Dictionary from the top right menu
- Click the menu icon (ā°)
- Select "Metric Dictionary"
-
Click Add Metric and describe what you want to track
- Use a clear, descriptive name
- Write a detailed description
-
Let the AI generate the SQL query
- Describe your metric in plain language
- Review the generated SQL
-
Review, test, and save your metric
- Validate with sample data
- Check for errors
- Save when satisfied
-
Assign it to relevant teams or use it in your analysis
- Add to team KPI dashboards
- Reference in chat conversations
- Include in reports
Troubleshooting
Common Issues
Metric not updating:
- Check data source connection
- Verify refresh schedule
- Review SQL for errors
Incorrect values:
- Validate SQL logic
- Check for null handling
- Verify date ranges
Slow performance:
- Optimize SQL query
- Add database indexes
- Consider pre-aggregation
Next Steps
- Setup Guide - Configure your first metrics
Support
For additional support or questions about metrics:
- š§ Email: support@treeo.ai
- š¬ Live Chat: Available in-app
Reach out to your workspace administrator for organization-specific guidance.
Ready to Get Started with Treeo?
Connect your warehouse, define metrics once, and give every team trustworthy self-serve insights.
