Hi all,
question: you all might answer in a couple of seconds, but gets me frustrated. I’m using grafana 8 with an influxdb datasource.
I’m trying the query data with a dashboard variable. (dashboard variable called BATCHID)
the query in the panel is: SELECT max(“WT1062.DrumCount.DrumNr”) FROM “opcua” WHERE (“MBR-R3.MBR-Dryer.BatchNo” = ‘$BATCHID’)
So I’m looking for a max value from a tag where the Batch number matches the dashboard variable. somehow. it keeps giving me NO DATA. and I know why, but I cannot fix it.
the query result in the query explorer is:
“SELECT max(“WT1062.DrumCount.DrumNr”) FROM “TEST”.“autogen”.“opcua” WHERE (“MBR-R3.MBR-Dryer.BatchNo” = ‘(109FF27)’)”
but it should not be: ‘(109FF27’) but ‘109FF27’. I use a similar query in the same dashboard which does give the correct value…
query:
SELECT cumulative_sum(“DI1091.dDT1091.PV”) FROM “opcua” WHERE (“MBR-R3.MBR-Dryer.BatchNo” = ‘$BATCHID’) AND (“C3200Production2019.BF.StepNr” > 9) AND (“C3200Production2019.BF.StepNr” <50)
query inspector:
SELECT cumulative_sum(“DI1091.dDT1091.PV”) FROM “opcua” WHERE (“MBR-R3.MBR-Dryer.BatchNo” = ‘109FF27’) AND (“C3200Production2019.BF.StepNr” > 9) AND (“C3200Production2019.BF.StepNr” <50)
anybody any idea???
Many thanks,
Richard