Hi,
Any ideas if I have a table with 3 columns and I want to do calculation on the 3 columns and the result is a 4rd one. How can I do that without having to use the add field transformation calculation
I can not seem to be able to make more than 2 combination of columns
You can chain add field from calculation transformations. So if you want (val1 + val 2) / val3 you can create a transformation for val1 + val2 and alias it to sum or something then create another one for sum / val3
Hi, I am doing that. I was just wondering if there is a more clean way
because if I have a lot of columns it looks very messy
If you’d like and youre on a newer version of grafana, there’s a new feature called <https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/sql-expressions/|sql expressions> that will let you write that calculation as a sql statement.
If you just want to sum all the columns or something like that, there’s the “reduce row” mode on that transformation where you can select all columns it applies to.
What’s your DB ? Would it be able to do the calculation for you?
I am using a combination of datasources, zabbix + loki
I will give that a try thanks