## Key

• This line was added.
• This line was removed.
• Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version r091
Excerpt

This example demonstrates how to use numeric functions to perform computations in your recipe steps.

Functions:

D generate list excerpts
pages ADD Function,MOD Function,NEGATE Function,SUBTRACT Function,MULTIPLY Function,DIVIDE Function,LCM Function

Source:

ValueAValueB
82
104
1510
56

Transformation:

Execute the following transformation steps:

D trans
RawWrangle true 'add' step derive type:single value:ADD(ValueA, ValueB) as:'add' Formula type Single row formula Formula ADD(ValueA, ValueB) New column name New formula

D trans
RawWrangle true 'subtract' step derive type:single value:SUBTRACT(ValueA, ValueB) as:'subtract' Formula type Single row formula Formula SUBTRACT(ValueA, ValueB) New column name New formula

D trans
RawWrangle true 'multiply' step derive type:single value:MULTIPLY(ValueA, ValueB) as:'multiply' Formula type Single row formula Formula MULTIPLY(ValueA, ValueB) New column name New formula

D trans
RawWrangle true 'divide' step derive type:single value:DIVIDE(ValueA, ValueB) as:'divide' Formula type Single row formula Formula DIVIDE(ValueA, ValueB) New column name New formula

D trans
RawWrangle true 'mod' step derive type:single value:MOD(ValueA, ValueB) as:'mod' Formula type Single row formula Formula MOD(ValueA, ValueB) New column name New formula

D trans
RawWrangle true 'negativeA' step derive type:single value:NEGATE(ValueA) as:'negativeA' Formula type Single row formula Formula NEGATE(ValueA) New column name New formula

D trans
RawWrangle true 'lcm' step derive type:single value:LCM(ValueA, ValueB) as:'lcm' Formula type Single row formula Formula LCM(ValueA, ValueB) New column name New formula

Results:

With a bit of cleanup, your dataset results might look like the following:

ValueAValueBlcmnegativeAmoddividemultiplysubtractadd
828-80416610
10420-1022.540614
151030-1551.5150525
5630-550.83333333330-111

D s also
label example_numeric_functions