Skip to main content
Skip table of contents

DIVIDE

Category: Math & numeric

Overview

Description

Extends the DIVISION (/) function with additional validation options. It produces the same result as using 'NodeLeft' / 'NodeRight' if the validation passes. In case the validation fails, it produces an error with detailed explanation.

Use when you want the result of regular division but need explicit mismatch validation and clearer error messages.

Syntax

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

Parameters

  • Node1: Dividend node, specified using the node name in single quotes, for example 'Profit'.

  • Node2: Divisor node, specified using the node name in single quotes, for example 'Profit'.

  • Validation: Additional validation mode.

Validations

  • NoValidation: Behaves exactly as DIVISION (/). This is the default option if no validation is specified.

  • FailOnMissingFirst: The calculation fails if any row in Node1 is not matched with any row in Node2.

  • FailOnMissingSecond: The calculation fails if any row in Node2 is not matched with any row in Node1.

  • FailOnMissing: Combines the FailOnMissingFirst and FailOnMissingSecond options.

Warning: Using validations has a performance impact.


Examples

Validation behavior

This example shows the standard division result and how the different validation modes behave when rows are missing on one side. The underlying numeric result matches regular division as long as the selected validation passes.

Input node: Node1

Year

Value

2026

6

2027

4

2028

10

Input node: Node2

Year

Value

2025

2

2026

3

2027

1

Formula: 'Node1' / 'Node2' = DIVIDE('Node1', 'Node2') = DIVIDE('Node1', 'Node2', "NoValidation")

Year

→ DIVIDE Result

2025

N/A / 2 = 0

2026

6 / 3 = 2

2027

4 / 1 = 4

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

Error: Year 2028 from Node1 has no matching value in Node2 and year 2025 from Node2 has no matching value in Node1.

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

Error: Year 2028 from Node1 has no matching value in Node2.

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

Error: Year 2025 from Node2 has no matching value in Node1.


Related Functions

Function

When to use instead

DIVISION (/)

When you want standard division without additional validation handling or detailed mismatch errors.

RATIO

When you want to divide two nodes while retaining only the dimensions shared by both inputs instead of using DIVIDE’s regular division-with-validation behavior.

JavaScript errors detected

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

If this problem persists, please contact our support.