Multiply function

Multiplies each value in the column by a positive or negative decimal or multiplies each value in two columns.

Namespace

  • arithmetic

  • decimal

Input

Numeric values

Output

Numeric values

Applied to one column

Multiplies each value in a column by the specified positive or negative decimal value.

Syntax

For non-decimal values:

set-column :column column * <decimal_value>

For decimal values:

set-column :column decimal:multiply(column,decimal_value)

Examples

Multiplies each value by 10 in the price column and outputs results to the price_new column:

set-column :price_new price * 10

set-column :price_new decimal:multiply(price, 10)

Applied to two columns

Multiplies values in two columns. 

Syntax

set-column :output_column arithmetic:multiply(column1, column2)

Example

Multiplies values in and col1 and col2 columns and outputs results to a new column col3:

set-column :col3 arithmetic:multiply(col1, col2)

 

Created in 2020 by Google Inc.