# IF STATEMENT

**URL:** <https://forum.knime.com/t/if-statement/25476>\
**Category:** KNIME Analytics Platform\
**Created:** [July 24, 2020, 3:14pm UTC](https://forum.knime.com/t/if-statement/25476 "2020-07-24T15:14:57Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ipazin](https://forum-cdn.knime.com/user_avatar/forum.knime.com/ipazin/32/806_2.png) [@ipazin](https://forum.knime.com/u/ipazin)\
**Post date:** [July 24, 2020, 3:24pm UTC](https://forum.knime.com/t/if-statement/25476/2 "2020-07-24T15:24:51Z")

</div>

Hi there @SimoneDePaoli,

in this case I would use [Math Formula](https://kni.me/n/2fI5rIsFDCFPHc0R) node and _if()_ function cause you have numeric columns.  
This would be syntax:  
`if(a > b, c * b, b)`

In case you are looking for some more complex if/else statements or string columns are included see this topic about [Column Expressions](https://kni.me/n/2_0ji_xeG-SudFu-) node:

> [@Need Help with a Simple IF THEN Statement](https://forum.knime.com/t/need-help-with-a-simple-if-then-statement/18434):
>
> I am trying to do a simple if-then calculation such as: IF [Column A] = 4 THEN [Column B] \* -1 ELSE [Column A] I want to take a price column and make it negative for returns. I have looked at the Rule Engine, Column Expressions, Java Snippet, Column Lag, and other nodes, but it is still not clear how to make this simple calculation. Can some please offer any suggestions? Thank you.

Br,  
Ivan

---

_[View the full topic](https://forum.knime.com/t/if-statement/25476)._
