"Query Discrepancy: Flux Query Renders Multiple Lines in InfluxDB but Only Displays First Point in Grafana"

If the contains() statement is the problem, maybe this thread will help: Dropdown menu in dashboards where data are coming from influxdb - #9 by fercasjr