I have created a variable “storeId” in the dashboard and populated it based on a tag query in InfluxDB. I have enabled “multi-valued” and “All” options. I could see that the dropdown in my dashboard is populated correctly with the query result.
When I am trying to use this variable in my query for graph, I am getting “No data points” though there are datapoints in the DB. Below is the query:
SELECT sum(customerCountIN) FROM "PcDetailedDaily" WHERE "storeId" =~ /^$storeId$/ AND $timeFilter GROUP BY time(1d), hour, storeId fill(0)
I tried using =~ /^[[storeId]]$/, but same result. When I see the Query Inspector, the variable is not getting replaced with the selected value for the variable:
SELECT sum(customerCountIN) FROM "PcDetailedDaily" WHERE "storeId" =~ /^[[storeId]]$/ AND time >= 1554379309993ms GROUP BY time(1d), hour, storeId fill(0)