The Math Formula (Multi Column) node is an extension of the Math Formula
node which evaluates a mathematical expression based on
the values in a row for a set of selected columns. It allows the user to
do with a single node what would otherwise require multiple nodes. If
you wanted to evaluate the same expression for more than one column with the Math Formula
node, you would need to string several Math Formula nodes together. For these cases,
the Math Formula (Multi Column) allows you to write a formula that refers to
the current column in a set of selected columns.

E.g.
to add 1 to the values of columns A, B, and C, you would select columns A, B, and C
and enter the formula "`$$CURRENT_COLUMN$$ + 1`

" into the Expression editor.

The computed results can be either appended as
new columns or be used to replace the selected input columns.

Available variables to use in the
expression are the values in the corresponding row of the table (left list
in the dialog).

Commonly used functions are shown in the list
"Mathematical Functions". There are also some constants available,
such as *pi* (the ratio of the circumference of a circle
to its diameter), *e* (the base of the natural logarithms), the total
number of rows in the table, and some other column based constants
(`constant`

category of functions).

This node uses *JEP*, the
Java Math Expression Parser.

Column based constants such as *COL_MIN(col_name)* will be calculated in advance (if necessary).

You can reference the integer flow variables like this: `$${IflowVar}$$`

,
the floating point flow variables like this: `$${DflowVar}$$`

.

The set of selected columns can be referenced using the CURRENT_COLUMN placeholder which looks like this:
`$$CURRENT_COLUMN$$`

. In each iteration of the node (looping over the set of selected columns) this
placeholder will be replaced with the column name from the current iteration.
It doesn't work for columns which contain dollar signs in their name.

Reference the columns with the form: `$colName$`

When any of the used columns contains a missing value, the result is missing, just like when the result would be NaN, infinite value, or outside of the 32 bit signed integer range when that is requested.

NaN values act as value true in boolean expressions and compared to anything (including NaN) in any way (including ==, but not !=, which is like !(... == ...)) is false (0).

*Please note the expressions are case sensitive.*

- Column Filter
- Selection of available numerical columns the node should loop over. In each iteration one column name from the selection will be used as replacement for the '$$CURRENT_COLUMN$$' placeholder in the expression.

- Column List
- Available numerical columns, which can be used as variables in the expression.
- Flow Variable List
- Available flow variables, which can be used as variables in the expression.
- Category
- The operator categories.
- Function
- A list of valid operators in the selected category.
- Description
- Short help about the operator.
- Expression
- The mathematical expression editor. You have completion available.
- Append Selected Columns with Suffix
- If selected new columns will be appended using the original column name with the specified suffix.
- Replace Selected Columns
- Whether the selected columns should be replaced.
- Convert Selected Columns to Int
- Whether the result for each selected column should be converted to an integer, or kept as a floating point number.

- This node has no views

- 00 Data GenerationKNIME Hub
- 00_Guided_Labeling_for_Document_Classification_(legacy)KNIME Hub
- 00b-KNIME_Introduction_ProteomicsKNIME Hub
- 01_AnonymizerKNIME Hub
- 01_AutoML_Component_via_Interactive_ViewsKNIME Hub
- Show all 377 workflows

- How to use if expressions in a column expressions nodeby izaychik63 on 2019-03-19forum.knime.com/p/56758
- Integer to Double Using Mathby armingrudd on 2019-04-27forum.knime.com/p/59522
- How do i average a column to become one number onlyby armingrudd on 2020-08-02forum.knime.com/p/98698
- Multiple 1 column to multiple columnby armingrudd on 2020-01-07forum.knime.com/p/78160
- How to apply the math node to a set of columnsby izaychik63 on 2020-04-20forum.knime.com/p/88228
- Show all 10 links

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.

To use this node in KNIME, install the extension KNIME Math Expression (JEP) from the below update site following our NodePit Product and Node Installation Guide:

v4.5

A zipped version of the software site can be downloaded here.

Do you have feedback, questions, comments about NodePit, want to support this platform, or want your own nodes or workflows listed here as well? Do you think, the search results could be improved or something is missing? Then please get in touch! Alternatively, you can send us an email to mail@nodepit.com, follow @NodePit on Twitter, or chat on Gitter!

**Please note that this is only about NodePit. We do not provide general support for KNIME — please use the KNIME forums instead.**