---
title: Reference Table Joins with Metrics
description: >-
  Use reference table joins with metrics to enhance your monitoring and analysis
  capabilities
breadcrumbs: Docs > Metrics > Reference Table Joins with Metrics
---

# Reference Table Joins with Metrics

## Overview{% #overview %}

Reference Tables enhance your monitoring and analysis capabilities by allowing dynamic tagging of metrics at query time. This simplifies the process of adding new tags to your metrics and requires no code changes. Use joins with reference tables to enable more meaningful and actionable insights from your metric data.

Using reference tables, you can accomplish the following:

- **Build context-rich dashboards**. Use [Reference Tables](https://docs.datadoghq.com/reference_tables/) to append more contextual tags such as `team` or `organization` to your metrics.
- **Simplify troubleshooting**. Alias opaque tag values (for example, IDs or codes) to human-readable values, reducing cognitive effort and resolution time.
  {% video
     url="https://datadog-docs.imgix.net/images/metrics/nested_queries/reference_table_joins_with_metrics/composite_metric_query_example.mp4" /%}

## Setup{% #setup %}

1. Create any metric query with [space aggregation](https://docs.datadoghq.com/metrics/#space-aggregation) (one or more tags are selected to group by).

1. Select the **Join** button (next to the **Formulas** button) as shown below:

   {% image
      source="https://datadog-docs.imgix.net/images/metrics/nested_queries/reference_table_joins_with_metrics/reference_table_join.46a57c88f4357c45a8e677608fd4af1a.png?auto=format"
      alt="The Join with Reference Table option in a metrics query" /%}

1. Specify the type of join and the reference table that you want to join with your metrics.

1. Define the join condition with the existing tag from your query (for example, `team`) and the column in your reference table to be used for the join.

1. Select columns from the reference table to represent the aliased or new tags that you want to add to your existing query.

   {% image
      source="https://datadog-docs.imgix.net/images/metrics/nested_queries/reference_table_joins_with_metrics/reference_table_example.c2aeed1c04fdf5a0ddbf27e2576ab572.png?auto=format"
      alt="A metrics query configured to join with a reference table" /%}

## Further reading{% #further-reading %}

- [Reference Tables](https://docs.datadoghq.com/reference_tables/)
