Make a difference between two columns into rule engine node

I need to create a column with the difference between two columns in a table. I have used rule engine but I do not know how to write the difference between two columns.
i attach the example:

I need to say:
if the difference between count(appliance_id) and count(appliance_id)_2019 is bigger than 0, write positive
otherwise write negative.

I need also to put another rule engine into another column with the value from the difference. not the word positive but the number. how can I do that?


Hi @giad

First calculate the difference (as a value) with the Math Formula node. The output of this node (column) can be input for the Rule Engine node .
gr. Hans

Why do you want to calculate the difference to see which one is bigger? Just compare directly using “>”:

$Count(applicance_id)$ > $Count(applicance_id)_2019$ => “Positive”


Hi there @giad,

agree with @tbtt that calculating difference is not necessary in your case. Additionally Column Expressions node can handle conditions with calculations together with ability to output multiple columns.


This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.