Back to Documentation
Key Modules

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.

Last updated: November 10, 2025
Key Modules

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.

  1. Click the menu icon (☰) in the top right corner of your workspace
  2. Select Metric Dictionary from the dropdown menu
  3. 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:

  1. Open the Metric Dictionary (as described above)
  2. Click the Add Metric button in the top right
  3. Provide a clear, descriptive name for your metric
    • Example: "Customer Acquisition Cost (CAC)"
    • Use full names with abbreviations in parentheses
  4. Write a detailed description of what the metric measures
    • What does it track?
    • Why is it important?
    • How should it be interpreted?
  5. Use the AI-powered SQL generation feature to automatically create the query based on your description
  6. Review and refine the generated SQL if needed
  7. 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

  1. Describe Your Metric: Write what you want to measure in plain English
  2. AI Analysis: The system analyzes your description and available data schema
  3. SQL Generation: Creates optimized SQL based on best practices
  4. Review & Edit: You can review and modify the generated query
  5. 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:

  1. Navigate to the Metric Dictionary
  2. Find the metric you want to modify (use search if needed)
  3. Click on the metric to open its details
  4. Make your changes to:
    • Name
    • Description
    • SQL query
    • Owner
    • Tags or categories
  5. 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:

  1. Open the Metric Dictionary
  2. Locate the metric you want to remove
  3. Click the delete option (trash icon or delete button)
  4. Review the impact (Treeo shows where the metric is used)
  5. 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:

  1. Clear Definition: What exactly is being measured
  2. Business Context: Why this metric matters
  3. Calculation Method: How the number is derived
  4. Interpretation Guide: How to read the results
  5. Owner: Who maintains this metric
  6. 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:

  1. Identify what you need to measure

    • What business question are you trying to answer?
    • What data do you need to track?
  2. Open the Metric Dictionary from the top right menu

    • Click the menu icon (☰)
    • Select "Metric Dictionary"
  3. Click Add Metric and describe what you want to track

    • Use a clear, descriptive name
    • Write a detailed description
  4. Let the AI generate the SQL query

    • Describe your metric in plain language
    • Review the generated SQL
  5. Review, test, and save your metric

    • Validate with sample data
    • Check for errors
    • Save when satisfied
  6. 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

Support

For additional support or questions about metrics:

Reach out to your workspace administrator for organization-specific guidance.

Share this page

Ready to Get Started with Treeo?

Connect your warehouse, define metrics once, and give every team trustworthy self-serve insights.