|This command is experimental|
eval calculates an expression and adds its result as a new table column.
/ or evaluations to calculate the expression. Separate with a comma multiple expressions in one
eval expression can contain either number or string values. Use quotation marks with string values.
%dpl | makeresults | eval firstValue = 10.5, secondValue = 62.9
%dpl index=example | eval City = "Town"
You can make simple math calculations with
eval by using
/ with variables.
%dpl | makeresults | eval decimal1 = 20.7, decimal2 = 28.9 | eval sum = decimal1 + decimal2, difference = decimal1 - decimal2, multiplication = decimal1 * decimal2, division = decimal1 / decimal2
|The calculation order is currently literal, so it may not give you the correct result. This will be fixed before the community release.|
You can combine two or more string values with
%dpl | makeresults | eval string1 = "this is text", string2 = " that continues with this" | eval combineText = string1 + string2
Use evaluation commands with
eval to get more detailed results.
%dpl index=example | eval CPI = if(_raw > 50.00, "↗ INCREASE", "↘ DECREASE")