To use the MEDIAN Function 

MEDIAN(Tag1,Tag2,Tag3)

The median is the value separating the higher half of a data sample, a population, or a probability distribution, from the lower half. For a data set, it may be thought of as the "middle" value.

Advantage of the median in describing data compared to the mean  is that it is not skewed so much by extremely large or small values, and so it may give a better idea of a "typical" value

Tag1   Tag2   Tag3              Output is Tag2

MEDIAN(Demo-influxdb/DEMO_01TI031.PV,Demo-influxdb/DEMO_01TI032.PV,Demo-influxdb/DEMO_01TI021.PV)