To use the MEAN Function
MEAN(TagTag1,TagTag2,TagTag3)
The mean is found by adding up all of the given data and dividing by the number of data entries. (Giving you the average)
...
MEAN(Demo-influxdb/DEMO_01TI031.PV,Demo-influxdb/DEMO_01TI032.PV,Demo-influxdb/DEMO_01TI021.PV)