Hello everybody,
I have a column where i want to replace each value who is between -5 et 5 by 0. How can i do that please ? I don’t find the solution with the math formula node.
Thank you verry much in advance and have a good day.
Hello everybody,
I have a column where i want to replace each value who is between -5 et 5 by 0. How can i do that please ? I don’t find the solution with the math formula node.
Thank you verry much in advance and have a good day.
Hello @ThomasAmb33,
if you want to use Math Formula node you need to use if() function. Following expression should do it:
if( between( -5, $yourColName$, 5 ), 0, $yourColName$)
However I prefer Rule Engine node for such tasks. Find it more intuitive and readable.
$yourColName$ > -5 AND $yourColName$ < 5 => 0
TRUE => $yourColName$
Br,
Ivan
Thank you verry much Ipazin for your reall quick answer, it works really well.
Hi @ipazin
This is not working for me in ‘Math Formula’
Alternatively you can use:
if( ceil(abs($yourColName$)/5) <= 1, 0, $yourColName$)
BR
@ThomasAmb33 glad I helped.
@gonhaddock you are right. Middle argument is tested. I automatically assumed it is the first one. I have edited my original reply. Thank you.
Br,
Ivan
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.