> ## Documentation Index
> Fetch the complete documentation index at: https://confidence.spotify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Metric

> Learn how to create a metric in Confidence.

export const HowToSchema = ({name, description, steps = []}) => {
  const schema = {
    "@context": "https://schema.org",
    "@type": "HowTo",
    name,
    description
  };
  if (steps.length > 0) {
    schema.step = steps.map((s, i) => ({
      "@type": "HowToStep",
      position: i + 1,
      name: typeof s === "string" ? s : s.name,
      text: typeof s === "string" ? s : s.text || s.name
    }));
  }
  return <script type="application/ld+json" dangerouslySetInnerHTML={{
    __html: JSON.stringify(schema)
  }} />;
};

<HowToSchema
  name="Create a Metric"
  description="Learn how to create a metric in Confidence."
  steps={[
"Go to Confidence",
"Select Metrics on the left sidebar",
"Click + Create",
{
  name: "Enter the name and description",
  text: "In the About step, enter the name of the metric and optionally a description. You can also set an owner.",
},
{
  name: "Select metric type",
  text: "In the Type step, select whether you want to create a conversion, consumption, or click-through rate metric. Select Custom to access average/share or ratio metrics for full customization.",
},
{
  name: "Select the entity and fact table",
  text: "In the Inputs step, select the entity you want to measure and the fact table that has the measurements for your metric. Optionally add filters to include only rows that match specific criteria. For average metrics, select how you want to aggregate data within units. See the average metrics section for different types of aggregations. For ratio metrics, select the numerator and denominator for the ratio. See the ratio metrics section for more information about the different options available.",
},
{
  name: "Configure time window",
  text: "In the Time window step, select when to include entities in metric results and set the starting point and duration for evaluating the data.",
},
{
  name: "Suggest usage (optional)",
  text: "In the Suggested usage step, set a preferred direction and threshold for the metric. These appear as defaults for your metric, but users can override them.",
},
{
  name: "Review and create",
  text: "In the Summary step, review your metric configuration. You can edit any section before clicking Create.",
},
]}
/>

A [metric](../metrics/metrics) is an aggregation of a measurement across instances of an entity.

## Create a Metric

<Steps>
  <Step title="Go to Confidence" />

  <Step title="Select Metrics on the left sidebar" />

  <Step title="Click + Create" />

  <Step title="Enter the name and description">
    In the **About** step, enter the name of the metric and optionally a description. You can also set an owner.
  </Step>

  <Step title="Select metric type">
    In the **Type** step, select whether you want to create a conversion, consumption, or click-through rate metric. Select **Custom** to access average/share or ratio metrics for full customization.
  </Step>

  <Step title="Select the entity and fact table">
    In the **Inputs** step, select the entity you want to measure and the fact table that has the measurements for your metric. Optionally add filters to include only rows that match specific criteria.

    For average metrics, select how you want to aggregate data within units. See [the average metrics section](../metrics/metrics#average-metrics) for different types of aggregations.

    For ratio metrics, select the numerator and denominator for the ratio. See [the ratio metrics section](../metrics/metrics#ratio-metrics) for more information about the different options available.
  </Step>

  <Step title="Configure time window">
    In the **Time window** step, select when to include entities in metric results and set the starting point and duration for evaluating the data.
  </Step>

  <Step title="Suggest usage (optional)">
    In the **Suggested usage** step, set a preferred direction and threshold for the metric. These appear as defaults for your metric, but users can override them.
  </Step>

  <Step title="Review and create">
    In the **Summary** step, review your metric configuration. You can edit any section before clicking **Create**.
  </Step>
</Steps>

<Tip>
  To create metrics via the API, see [Create Metrics](../api/how-to-guides/metrics/create-metric) in the API how-to guides.
</Tip>

## Related Resources

<CardGroup cols={2}>
  <Card title="Validate Metrics" href="/docs/how-to-guides/validate-metric">
    Verify your metric is calculating correctly
  </Card>

  <Card title="Metrics Reference" href="/docs/metrics/introduction">
    Deep dive into metric types and configuration
  </Card>

  <Card title="Create Fact Tables" href="/docs/how-to-guides/create-fact-table">
    Set up the data source for your metrics
  </Card>

  <Card title="Launch an A/B Test" href="/docs/quickstarts/launch-abtest">
    Use your metrics to measure experiments
  </Card>
</CardGroup>
