I want to get the fields by another filed’s value. such like " SELECT DW1COntrolStatus,DW2ControlStatus Where Waste=false". The below code is not right. How to write the code?
from(bucket: "scada")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "PMD43")
|> filter(fn: (r) => (r["_field"] == "Waste" and r._value==false) or r["_field"] == "DW1ControlStatus" or r["_field"] == "DW2ControlStatus" )
|> aggregateWindow(every: 5m, fn: last, createEmpty: false)
@Jay_Clifford ,Thanks for your reply! The fileds’ name is changed automaticly.How to change it? And it can’t refresh in Grafana.
How to hide the column of Waste in the result?