# I can't set dual y-axis

**URL:** <https://community.grafana.com/t/i-cant-set-dual-y-axis/91340>\
**Category:** Dashboards\
**Tags:** templating, query-help\
**Created:** [July 12, 2023, 1:37am UTC](https://community.grafana.com/t/i-cant-set-dual-y-axis/91340 "2023-07-12T01:37:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![south\_wind](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@south\_wind](https://community.grafana.com/u/south_wind)\
**Post date:** [July 12, 2023, 1:37am UTC](https://community.grafana.com/t/i-cant-set-dual-y-axis/91340/1 "2023-07-12T01:37:43Z")

</div>

I use grafana 8.1.2 on windows;  
I plot two lines(A and B) on one panel and I want to set line A’s y axis on left and B’s on right; I set as below, but not work.

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/8/a/8a88fab7e4abaf93035db6a169e47bd8193a0f5a.png)

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/0/0/0081bb3aaf48bca8acbfb5444e19179635470028.png)

---

<div class="post-metadata">

**Author:** ![grant2](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/grant2/32/42281_2.png) [@grant2](https://community.grafana.com/u/grant2)\
**Post date:** [July 12, 2023, 9:31am UTC](https://community.grafana.com/t/i-cant-set-dual-y-axis/91340/2 "2023-07-12T09:31:54Z")

</div>

Hi @south_wind

Can you share your query screen? You should have A and B as separate queries.

---

<div class="post-metadata">

**Author:** ![south\_wind](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@south\_wind](https://community.grafana.com/u/south_wind)\
**Post date:** [July 12, 2023, 11:52am UTC](https://community.grafana.com/t/i-cant-set-dual-y-axis/91340/3 "2023-07-12T11:52:19Z")

</div>

Hi @grant2  
The queries are as below:

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/3/9/39b52acf816bb3fb63d67ffa81ec3e5dea0be625.png)  
my Query Language:  
 ![image](https://us1.discourse-cdn.com/grafana/original/3X/3/9/39ab5827c9c9f51d12006529c1fb636c096bf49b.png)

Thank you for your reply.

---

<div class="post-metadata">

**Author:** ![grant2](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/grant2/32/42281_2.png) [@grant2](https://community.grafana.com/u/grant2)\
**Post date:** [July 12, 2023, 12:09pm UTC](https://community.grafana.com/t/i-cant-set-dual-y-axis/91340/4 "2023-07-12T12:09:26Z")

</div>

If you change the override to “Fields Returned by Query” and then select B, does that help?

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/1/e/1e5023083f56707fd7757b5df17e2bc5948939f8.png)

---

<div class="post-metadata">

**Author:** ![south\_wind](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@south\_wind](https://community.grafana.com/u/south_wind)\
**Post date:** [July 12, 2023, 12:42pm UTC](https://community.grafana.com/t/i-cant-set-dual-y-axis/91340/5 "2023-07-12T12:42:47Z")

</div>

I have tried and this doesn’t work;  
If I set A to be ‘left’, then both A and B are ‘left’;  
If I set A to be ‘right’, then both A and B are ‘right.’

---

<div class="post-metadata">

**Author:** ![grant2](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/grant2/32/42281_2.png) [@grant2](https://community.grafana.com/u/grant2)\
**Post date:** [July 12, 2023, 1:05pm UTC](https://community.grafana.com/t/i-cant-set-dual-y-axis/91340/6 "2023-07-12T13:05:11Z")

</div>

Only thing that I can think of is that your version of Grafana has some bug in it. Can you upgrade to the latest version?

---

<div class="post-metadata">

**Author:** ![south\_wind](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@south\_wind](https://community.grafana.com/u/south_wind)\
**Post date:** [July 12, 2023, 2:23pm UTC](https://community.grafana.com/t/i-cant-set-dual-y-axis/91340/7 "2023-07-12T14:23:56Z")

</div>

Thank you @grant2  
I have upgrade into the latest version and now I can set dual y axis.
