Apology up front - new to Grafana so will likely be using the wrong nomenclature, so please be considerate!
I’m looking for a way to use a value pulled from influx, interpolate a result from a table, compare to a second value from influx & give a text output.
Specifically I have a fluid pressure & temperature, want to use the pressure to look up the saturation temperature in a table to output if the fluid temperature is above/around/below that.
I have it working nicely in Excel, but would prefer to get a live panel on the go on my dashboard:
=IF(E7>Q7,“Above”,IF(E7<Q7,“Below”,“Around”))
E7 = Fluid Temp.
Q7 = FORECAST($D7,O7:P7,M7:N7) ← Saturation Temp.
D7 = Fluid Pressure
M7:N7 = Sat. table pressures above & below D7 (done with index matching to the saturation table)
It’s not anywhere other than excel on my desktop just yet - literally at square one for knowing where to go with this. Did my best to look it up but haven’t struck upon the right terminology to get an answer!
Values are logged every 10 seconds, but as I’m pulling from grafana (rather than influx directly) it tends to skew that in the data I pull, but what I want is a calculation live in Grafana so I’m not bothered by that.
It might be a bit of a tangent, but how does the precision affect what I’m after? I can’t say for certain but it’s in the second to millisecond range. So long as the output I’m after is accurate to within 5 minutes I’m happy (I’m looking at weeks worth of data that changes slowly).
doesn’t affect you at all, but it affects us being able to help you. as I said in the beginning we don’t have access to your data so we need to spin up a copy of your data in our environment.
I’ve managed to make some progress, but have hit a snag I can’t get past:
I’ve managed to upload a CSV with the pressure values I’m after, using a field tag for the associated temperatures. This way I’ve successfully pulled the pressure value by looking up the temperature tag - e.g, look up the field tagged “7”, it pulls the pressure “9.93”.
Separately I can pull the live value of the temperature reading “TL1 = 7.5” & round it down to “TL1int = floor(TL1) = 7”.
The hurdle I can’t get past is then using “TL1int” in place of “7” typed manually to pull “9.93”. I’m thinking if this works I’ll then be able to see a time history of the different pressure values with changing temperature readings. I’ve two thoughts on the issue:
I shouldn’t be using field tags like that
I need to convert the “TL1int” from a number to text or other format