# Is it possible to change panel according to dropdown selector?

**URL:** <https://community.grafana.com/t/is-it-possible-to-change-panel-according-to-dropdown-selector/125785>\
**Category:** Dashboards\
**Tags:** api\
**Created:** [July 9, 2024, 7:13am UTC](https://community.grafana.com/t/is-it-possible-to-change-panel-according-to-dropdown-selector/125785 "2024-07-09T07:13:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ebabeshko](https://avatars.discourse-cdn.com/v4/letter/e/9d8465/32.png) [@ebabeshko](https://community.grafana.com/u/ebabeshko)\
**Post date:** [July 9, 2024, 10:17am UTC](https://community.grafana.com/t/is-it-possible-to-change-panel-according-to-dropdown-selector/125785/2 "2024-07-09T10:17:15Z")

</div>

> [@korateheera92](#):
>
> So these are two panels I want to show only one according to dropdown change

You can use variables to parametrize your queries and change data in your panel:

![variables](https://us1.discourse-cdn.com/grafana/original/3X/b/e/be5776139f3ed4911db9a126ef1e5f9032288d66.gif)

> **[Variables | Grafana documentation](https://grafana.com/docs/grafana/latest/dashboards/variables/)**
>
> Add variables to metric queries and panel titles to create interactive and dynamic dashboards

You can also provide queries via variables:

> [@Change Grafana query dynamically based on user inputs](https://community.grafana.com/t/change-grafana-query-dynamically-based-on-user-inputs/26416/4):
>
> Hi @zahrazare313, Dynamic queries can be achieved with dashboard variables. Here are my two queries in InfluxDB (Flux language) for CPU idle usage and memory usage. &nbsp; CPU idle: from(bucket: "test") |\> range(start: v.timeRangeStart, stop: v.timeRangeStop) |\> filter(fn: (r) =\> r["\_measurement"] == "cpu") |\> filter(fn: (r) =\> r["\_field"] == "usage\_idle") |\> filter(fn: (r) =\> r["cpu"] == "cpu-total") |\> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false) |\> yield(na…

---

_[View the full topic](https://community.grafana.com/t/is-it-possible-to-change-panel-according-to-dropdown-selector/125785)._
