Grafana + InfluxDB Flux - sort data fetched from multi-selected measurement variable inputs

I have setup a query where I am getting data(water level) from multiple measurements(water tanks) and displaying on a single bar gauge panel aligned horizontally as seen below.

In the bar gauge panel, the data is appearing to be shown as 1 row for each measurement and some value which appears to be the latest value.

However I want to apply the sorting to the combined data for all measurements.
Meaning, I want to display the min or max value across different measurements.

I had tried this with InfluxQL, but unfortunately sorting does not work in there.
Moreover if I try to apply sorting using the transformation, it is applied on the measurement name instead of the data.

Is there any way we could do this type of sorting to display the top 10 water levels or the bottom 10 water level values across different measurement(tanks).

Below is my query I am using currently, but not getting expected output.

from(bucket: "WaterMoniterDB/autogen")
|> range(start: v.timeRangeStart, stop:v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] =~ /${Tank:regex}/  and r._field == "Water_Level")
|> sort(columns: ["Water_Level"], desc: false)

Thanks and Regards
Bhushan

Now I am able to sort the values for the single measurement time series data.

from(bucket: "WaterMoniterDB/autogen")
|> range(start: v.timeRangeStart, stop:v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "44001"  and r._field == "Water_Level")
|> bottom(n:3, columns:["_value"])

Above query gives the lowest 3 values for 44001 device.
However when the same query is ran for the all the devices together, it should club data from all devices and then show the top/bottom 3 values.

from(bucket: "WaterMoniterDB/autogen")
|> range(start: v.timeRangeStart, stop:v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] =~ /${Tank:regex}/  and r._field == "Water_Level")
|> bottom(n:3, columns:["_value"])

If anybody has some inputs on this, it would be really helpful.

Thanks and Regards,
Bhushan