Skip to main content
Skip table of contents

DIVIDE

Basic 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.

Signature

DIVIDE(Node1, Node2 , [Validation])

Parameters

  • Node1: Dividend node, specified using the node name in single quotes (e.g. 'Profit')
  • Node2: Divisor node, specified using the node name in single quotes (e.g. 'Profit')
  • Validation: additional validations
Validation options
  • NoValidation: behaves exactly as DIVISION (/). 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 FailOnMissingFirst and FailOnMissingFirst validation options.

Warning: Using validation has performance impact.

Available since3.9.0

Example

Node1 = 

YearMeasure
20186
20194
202010

Node2 = 

YearMeasure
20172
20183
20191



Node1 / Node2 = DIVIDE(Node1, Node2) = DIVIDE(Node1, Node2, "NoValidation")

YearMeasure
2017NaN / 2 = 0
20186 / 3 = 2
20194 / 1 = 4

DIVIDE(Node1, Node2, "FailOnMissingFirst") = 

Error, because year 2020 from Node1 has no matching value in Node2.

DIVIDE(Node1, Node2, "FailOnMissingSecond") = 

Error, because year 2017 from Node2 has no matching value in Node1.

DIVIDE(Node1, Node2, "FailOnMissing") = 

Error, because year 2020 from Node1 has no matching value in Node2 and year 2017 from Node2 has no matching value in Node1.



JavaScript errors detected

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

If this problem persists, please contact our support.