← All nodes
Transformations

Formula

Runs several calculations per row in one node: each line is Name = formula, and later lines can use what earlier lines worked out.

When to use it

Use it instead of a chain of Calculated Column nodes when values build on each other — gross, then tax, then net — or when you need a working value that should not end up as a column.

In a pipeline

Settings

SettingTypeRequiredDefault or hint
Statements (one per line or ;)textareaYesvar Gross = {Qty} * {Price} Tax = ROUND({Gross} * 0.2, 2) Net = {Gross} + {Tax}

Example

Gross, tax and net in one step

  • Statements (one per line or ;)=var Gross = {Qty} * {Price}; Tax = ROUND({Gross} * 0.2, 2); Net = {Gross} + {Tax}
Order lines
ItemQtyPrice
Widget212.5
Bolt100.35
Result
ItemQtyPriceTaxNet
Widget212.5530
Bolt100.350.74.2

Gross is a var: later statements use it as {Gross}, but it is not written as a column.

Worth knowing

  • Columns are written {Column Name}; variables as $Name. The functions and operators are the same as Calculated Column's.
  • A new name becomes a column at the end of the table; the name of an existing column overwrites it in place, e.g. Price = {Price} * 1.1.
  • Separate statements with new lines or semicolons. A semicolon inside quotes or {braces} is part of the statement.
  • A row that cannot be calculated gets an empty value; the node reports which statement failed and why.

Others in Transformations