Multi-value query variable not working for some queries

Hi,

I am using variables to plot data from various sensors. I have created two variables for two sensor types (HR and BT) that pull a number of sensor IDs. In the Query variable window, I am able to see (see attachment below) that I have multiple sensor IDs for the BT_sensor variable.

In my panel, I am using the variable to query for data for these multiple sensors IDs at once. See the image below:

However, the query is only performed for a single sensor. See the query result:

I have the exact same structure for the HR sensors, which does query the database for all of my sensors values as I expect.

I’ve confirmed there is data is present in the database for more than one of the BT_sensor IDs. – if I just query through my datasource through the command line for the sensor IDs hardcoded, rather than using a variable, I am able to see data. It seems the Grafana variable is failing to do perform the query for multiple values of BT_sensor, even though in the query variable setup window I definitely see that it has multiple values.

Am I doing something wrong or is this a bug?

Eric

Oh, I think I’ve solved this. The default value of the variable was set to the single value instead of all and because I have the visibility of the variable set to ‘off’, I was unable to see it.

If I set the value of BT_sensor to ‘all’ then it works

1 Like