Skip to main content
Skip table of contents

MULTIPLY

Category: Math & numeric

Overview

The MULTIPLY function extends the * operator with optional validation for missing rows. It produces the same result as 'Node1' * 'Node2' when validation passes. When validation fails, it produces an error with a detailed explanation of which rows are missing.

Use this function when you want standard multiplication but need to detect mismatches between the two input nodes.

Syntax

MULTIPLY('Node1', 'Node2' [, "Validation"])

Example usage: MULTIPLY('Volume', 'Price', "FailOnMissing")

Parameters

Parameter

Description

Type

Required

Default

Node1

First factor node, specified using the node name in single quotes (e.g.'Volume')

Node reference

Yes

--

Node2

Second factor node, specified using the node name in single quotes (e.g.'Price')

Node reference

Yes

--

Validation

Controls how mismatches between the two input nodes are handled.

Keyword

No

NoValidation

Validation options:

  • "NoValidation": No mismatch check. Behaves exactly as the * operator. This is the default.

  • "FailOnMissingFirst": Fails if any row in Node1 has no matching row in Node2.

  • "FailOnMissingSecond": Fails if any row in Node2 has no matching row in Node1.

  • "FailOnMissing": Fails if either node has rows not matched by the other (combines both checks).

Output Shape

Aspect

Behavior

Dimensionality

Union of all dimensions from both inputs (same as *). Per shared dimension, the finest level is used.

Level values

Matched on shared dimensions. Non-shared dimensions are applied across all matching rows.

Row count

Equal or expanded. Where one input has no matching value, the result is 0 (not N/A).

Watch Out

  • Using validation has a performance impact. Only use it when you need to detect mismatches.

  • Without validation (or with NoValidation), MULTIPLY is identical to *. Where one input has no matching value for a row, the result is 0.


Examples

Validation behavior

This example shows the default multiplication result and how the different validation modes behave when the two input nodes do not fully overlap. The missing years at the start and end of the time range trigger the validation errors.

Input node: Node1

Year

Value

2026

6

2027

4

2028

10

Input node: Node2

Year

Value

2025

2

2026

3

2027

1

Formula: MULTIPLY('Node1', 'Node2') = MULTIPLY('Node1', 'Node2', "NoValidation")

Year

→ MULTIPLY Result

2025

NaN * 2 = 0

2026

6 * 3 = 18

2027

4 * 1 = 4

2028

10 * NaN = 0

Formula: MULTIPLY('Node1', 'Node2', "FailOnMissingFirst")

Error: The calculation fails because year 2028 from Node1 has no matching value in Node2.

Formula: MULTIPLY('Node1', 'Node2', "FailOnMissing")

Error: The calculation fails because year 2028 from Node1 has no matching value in Node2 and year 2025 from Node2 has no matching value in Node1.

Formula: MULTIPLY('Node1', 'Node2', "FailOnMissingSecond")

Error: The calculation fails because year 2025 from Node2 has no matching value in Node1.


Related Functions

Function

When to use instead

MULTIPLICATION (*)

When you want standard multiplication across shared levels without additional validation handling.

DIVIDE

When you need the same kind of validated arithmetic behavior but want to divide values instead of multiplying them.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.