docs/sources/visualizations/dashboards/build-dashboards/create-dashboard/dashboard-controls.md
In the Dashboard controls section of the sidebar, you can add variables, annotation queries, dashboard links, and controls to filter and group data, without leaving the dashboard.
{{< figure src="/media/docs/grafana/dashboards/screenshot-dashboard-controls-v13.1.png" max-width="400px" alt="Dashboard controls in the Dashboard options sidebar view" >}}
{{< admonition type="note" >}}
The Filter and Group by feature renames the Ad hoc filters variable and extends it by adding grouping for Prometheus and Loki data sources.
However, in the dashboard schema, it's still referred to as "kind": "AdhocVariable" under the variables schema property.
{{< /admonition >}}
{{< shared-snippet path="/docs/grafana/<GRAFANA_VERSION>/visualizations/dashboards/build-dashboards/filter-group-by/index.md" id="add-filter-group-by" >}}
For more detailed information on the Filter and Group by option, refer to the full Filter and group by controls documentation.
To add a variable, follow these steps:
{{< docs/list >}}
Navigate to the dashboard you want to update.
Click Edit.
Click + Add variable at the top of the dashboard or click the Add new element icon (blue plus sign) and select Variable.
Choose a variable type from the list.
You can update the variable type by clicking Change type in the sidebar.
{{< shared-snippet path="/docs/grafana/<GRAFANA_VERSION>/visualizations/dashboards/variables/add-template-variables/index.md" id="add-variable" >}}
{{< column-list >}}
{{< /column-list >}}
{{< /docs/list >}}
For more detailed information on variables, refer to the full Variables documentation.
To add an annotation query, follow these steps:
{{< docs/list >}}
Navigate to the dashboard you want to update.
Click Edit.
Click the Add new element icon (blue plus sign).
Click Annotation query.
Enter a name for the annotation query.
This name is given to the toggle that allows you to enable/disable showing annotation events from this query.
{{< shared-snippet path="/docs/grafana/<GRAFANA_VERSION>/visualizations/dashboards/build-dashboards/annotate-visualizations/index.md" id="add-annotation-query" >}}
To add a query, do one of the following:
{{< admonition type="note" >}} Saved queries is currently in public preview in Grafana Enterprise and Grafana Cloud only. {{< /admonition >}}
(Optional) Click Test annotation query to ensure that the query is working properly.
Click Close when you've completed the query setup.
Click Save.
(Optional) Enter a description of the changes you've made.
Click Save.
Click Exit edit.
{{< /docs/list >}}
For more detailed information about annotations, refer to the full Annotations documentation.
For more detailed information on dashboard links, refer to the full Dashboard links documentation.
To add a link to another dashboard at the top of your current dashboard, follow these steps:
{{< docs/list >}}
{{< shared-snippet path="/docs/grafana/<GRAFANA_VERSION>/visualizations/dashboards/build-dashboards/manage-dashboard-links/index.md" id="add-dashboard-link" >}}
{{< /docs/list >}}
Add a link to a URL at the top of your current dashboard. You can link to any available URL, including dashboards, panels, or external sites. You can even control the time range to ensure the user is zoomed in on the right data in Grafana.
To add a URL link to your dashboard, follow these steps:
{{< docs/list >}}
{{< shared-snippet path="/docs/grafana/<GRAFANA_VERSION>/visualizations/dashboards/build-dashboards/manage-dashboard-links/index.md" id="url-dashboard-link" >}}
{{< /docs/list >}}
After you add dashboard controls, you can manage them from the dashboard options. In this view, the sidebar includes collapsible sections for filters, variables, annotations, and links, including hidden controls that aren't otherwise visible on the dashboard:
{{< figure src="/media/docs/grafana/dashboards/screenshot-dashboard-controls-mgmt-v13.1.png" max-width="450px" alt="Dashboard controls in the Dashboard options sidebar view" >}}
To manage dashboard controls, follow these steps:
Click the Dashboard options icon in the sidebar.
In the sidebar, expand the appropriate collapsible section.
Do one or more of the following:
{{< admonition type="tip" >}} To get back to controls management from configuration, click the Dashboard options icon. {{< /admonition >}}
Make any other changes as needed.
Click Save.
(Optional) Enter a description of the changes you've made.
Click Save.
Click Exit edit.