Hello,
I do my first steps in Grafana and struggle with a graph showing the difference between values.
In a tutorial I have seen it was quite easy to do. In a query under “select” there was a point named “Transformations” under that point it was possible to select difference.
When I use the “+” under “select” there is only “Aggregate Functions”, “Alias” and “Column” - no “Transformations”.
Do I need some additional Plugin or anny configuration?
DataSource is a MariaDB. Connection to the DB is working, I can plot different graphs.
I use the grafana version v7.5.17 on a Windows PC with Firefox Browser
(I have used this version because this is the version also used in the tutorial)
Can you clarify what you mean by “a difference between values”? For example, the difference between two consecutive values? Or the difference between the first value and last value?
You should not need a plugin to do this, and MariaDB should be fine.
Hello @grant2 ,
it should be the difference between 2 values in the defined interval (Group by time($_interval,*).
The data is the countervalue from an energy meter, counting up with the consumption. To get the graph consumption over time I need the difference between the values from the start and the end of the interval.
All this is done in several tutorials with the selection of difference in the select column.
But for me there is none of the posssible selection possibilities.
Yes I use MariaDB what is, so I have learned, compatible with MySql.
So the datasource has the state tested and OK after configuration in grafana.
Also the access to the data is possible.
Is this my problem? Does the database type MySql not support such functions as difference?
Is the things I can choose in the query a feature of the database or part of grafana?
@markus_m I watched the tutorial and yes, because he is using InfluxDB (with InfluxQL as the language for the query), he has the Difference transformation option visible in his query options. Since you are using MariaDB and/or MySQL, you do not have that option.
The same happens if you choose Prometheus or Zabbix or Graphite or some other datasource. The query language / options will be different for each.