Query type variable contains two fields, they are “name” and “code” of the metric.
The query statement for variable is : select mID as __Value , mName as __Text from meterInfo
While in dashboard drop down list the two fields are all visible, how to set only name field in the list?
Another question is how to use this variable in dashboard to filter the metric? I tried it but failed.
In the metric it is :
SELECT
$__time(DT) ,
TT11 as value,
PACKAGENUM as metric
FROM HEU.DBO.GIS24HOUR where PACKAGENUM = $huName
The sql result of generator result is:
SELECT DT as time, TT11 as value, PACKAGENUM as metric
FROM GIS24HOUR where PACKAGENUM = SSH0000001
I expect it should be:
SELECT DT as time, TT11 as value, PACKAGENUM as metric
FROM GIS24HOUR where PACKAGENUM = ‘SSH0000001’