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

6 Likes

Thank you verry much Ipazin for your reall quick answer, it works really well.

1 Like

Hi @ipazin

This is not working for me in ‘Math Formula’

Alternatively you can use:

`if( ceil(abs($yourColName$)/5) <= 1, 0, $yourColName$)`

BR

1 Like

@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

1 Like

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