How do I turn multiple queries into one using InfluxDB v1.8.10 and Grafana v10.4.1

I want to combine sixteen queries into just one if this is possible. I am trying to achieve this through the panel editor in influxdb. Where X = cell number, all sixteen raw queries looks like this:
SELECT mean(“value”) FROM “battery/Voltages/CellX” WHERE $timeFilter GROUP BY time($__interval) fill(null)

I am also aiming to rename the displayed name from, “battery/Voltages/CellX” to simply, “Cell_X”. Do I need to do an override for each of the sixteen queries? This is the reason I want to amalgamate all my queries into one if that is possible.

@NorthTown
Did you try to use the transformation?
With that you can reduce the number of lines to one.
You can choose in which way you want to reduce, like min, max, avg etc.

With transformations, you can also do renames, filtering etc.

1 Like

Hi cbos thank you for your repy! Do you mean this? ([^.]+)…+ I have tried to understand but I’m not getting it at all. Can you simplify it?

You can use the “Rename field by regex” option.

Then you can use this as regex (as example):
battery\/Voltages\/(Cell\d+).mean

Then $1 will be Cell1