How can I auto scale units of two queries in the same way?

Hi together,
I have a small but not so nice representation with 2 queries as a graph with auto-y-scaling.

  • What Grafana version and what operating system are you using?
    Grafana v10.4.2 with Docker on RPI-Ubuntu-linux

  • What are you trying to achieve?
    I have to queries, same time range and same value range.
    First with the unit MilliVolt and seconde one with unit Volt.
    I want to have one graph with both querie results and the same auto scaling range.

  • How are you trying to achieve it?
    In the “All” section I set the unit to “Volt”, which represents the Values of the first querry.
    For the second querry I used the override option for unit and picked for the second querry “Millivolt”, which represents the Values of the second querry.

  • What happened?
    See picture.


    There is a deviation in the y-axis,

  • What did you expect to happen?
    That the y-axis scaling would the same or a option to use for both the same autorange.
    I need the auto scaling effect, so a fixed min/max values for y-axis are not so nice.

Maybe someone has a hint for me.

Thanks in advance, Thomas.

May be you can make units the same in your queries? I.e. to have Volts both in first and second query.

Is it possible within grafana, to multiply (or divide) each element of the column by 1000?

Edit:
I try now:
|> map(fn: (r) => ({ r with _value: r._value / 1000.0 }))

But an option to force the same scale would be useful.

In summary my question is answered.

Yes, it’s also possible to do in Grafana using transformation:

But I would prefer to do such type of calculation in a query, just like you did using Fluxlang

1 Like