This is really a Grafana question. Grafana has many ways to do things and select things, so it really depends on what you are trying to accomplish. Grafana supports InfluxDB group by syntax to allow a single query to become multiple lines. You can use a where clause with units to select things that have the same units. This doesn’t work for W and Watts, since they are not the same string even if they are the same unit. There are multiple ways to get around this. You can add an OR to the where clause. I don’t think the GUI supports this, but the underlying syntax should.
I don’t have units tagging on my IotaWatt, so I have a Grafana query variable that gets all the CT channels and another one to get the watts channels from my Tasmota devices. I then have independent queries in each panel for IotaWatt and Tasmota. Grafana has some tools for reducing data that can do simple math.
You can use Flux queries (have to have the latest 1.8 Influxdb and latest Grafana) to do more complex math, but they can be tricky to get right.