Index values in multi-value variable

I have a multi-value variable ($query) which is a list of values returned from following the query

I have been struggling to index into the values to be able to have a different value for each panel, the panels are repeated on “pos” (position).

SELECT ($brush_len - min(“value”) + ${query:raw}) / $brush_len
FROM “distance”
WHERE (“pos” = ‘0’)
AND $timeFilter
GROUP BY time($__interval) fill(null)

When I explore the query, it shows that the query variable returns all the variables seperated by commas.

SELECT (80 - min(“value”) + 36.83288161821595,47.73731465027502,43.992766667638584,41.278957195205244,25.64999999999999,41.82527021932452,53.23768306643687,39.191064761424435,40.232936927338756,44.487646358699614,43.02676064861798,39.069940951571574,34.67222197680811,48.64420322587512,51.49523169533659,80.66666666666667,44.54853022835014) / 80
FROM “distance”
WHERE (“pos” = ‘0’)
AND $timeFilter
GROUP BY time($__interval) fill(null)

The might work ${query.0}