Query Influx - From $variable problem

Hello,
when I write a query in which the “FROM” is a variable, then the “FIELD” does not show the list of fields present in the measurement.

If instead I use a measurement then it works well
Selezione_006