I’m using Grafana version 10.0.2 and I created a connection with the OSIsoft-PI plugin.
With this plugin, I developed queries using attributes of AF elements.
I would like help solving two questions:
-
For a given query, if the time series value is negative, I want to replace this value with 0
-
When comparing other two metrics X and Y, if X < Y I wish X to get “-”
1 Like
Welcome @lap1972
Have you taken a look at the transformations docs yet? This part of Grafana was designed for the kind of purpose you’re looking for:
Check out the binary transform option, you can probably do what you want with that. Note that I probably wouldn’t approach this by trying to change your source data. Rather, use calculated fields to create a new field, that is a calculation based on the other fields. For example, you can calculate Y-X as a value to find their difference, and then filter or do other things on the basis of those values being negative, as an example.