---
title: "Create custom variables | Grafana Labs"
description: "Learn how to create variables with manually defined option lists."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Create custom variables

Custom variables use manually defined option lists rather than querying data sources, making them ideal for static values that don’t change frequently or don’t exist in your data. They’re perfect for cases where you want to present specific choices to users without depending on query results.

They also offer predictability and control when the available options should remain consistent regardless of what data exists in your data sources.

While query-based variables are excellent for discovering dynamic infrastructure, custom variables provide control over exact options and ordering for business logic that exists outside your monitoring data.

To create a custom variable, complete the following steps:

01. Open your dashboard and click **Edit**.
02. In the right sidebar, click **Dashboard options** (gear icon).
03. In the **Variables** section of the pane, click **Add variable**.
04. Click **Custom** to choose the custom variable type.
05. In the **Name** field, enter the variable name you’ll use in queries.
    
    For example, enter `severity`.
06. Under **Custom options**, click **Open variable editor**.
07. In the **CSV** tab, enter comma-separated values.
    
    For example, enter `critical,warning,info,debug`.
    
    Review **Preview of values** to confirm the list matches what you expect.
08. Click **Apply** to save the custom options.
09. Click **Save** to save the dashboard with your new variable.
10. The dashboard displays the custom variable at the top as a drop-down list with your defined options.

In the next milestone, you learn how to reference variables in panel queries to filter data based on user selections.
