Skip to main content
Skip table of contents

ADDEACH

Category: Math & numeric

Overview

The ADDEACH function adds a numeric value (or the values of another node) to each individual entry of a node before any aggregation is applied.

Use this function when you need to apply an entry-by-entry adjustment to every value of a node while preserving the node’s dimensionality.

Syntax

ADDEACH('Node', Amount | 'AmountNode')

Example usage: ADDEACH('Growth Rate', 1)

Parameters

Parameter

Description

Type

Required

Node

The input node, referenced by name in single quotes (e.g. 'Profit')

Node reference

Yes

Amount / AmountNode

A numeric value or another node to add to each entry

Number / Node ref

Yes

Output Shape

Aspect

Behavior

Dimensionality

Preserves the input shape

Row count

Same number of rows as the input node

Values

Each value of the node is increased by the specified amount

Watch Out

  • ADDEACH performs entry-by-entry addition before rollups (automatic aggregation up hierarchies, e.g. months summing to quarters).

  • The + operator adds values after rolling them up to a common level. For example:

    • 'Node' + 5 first aggregates Node to a single total, then adds 5 once.

    • ADDEACH('Node', 5) adds 5 to every individual row before any aggregation.

  • When using another node as the Amount, the operation matches values across shared dimensions only.


Examples

Convert a percentage to a factor

A growth rate of 5 % is stored as 0.05 in Valsight.
To use it as a multiplication factor (1.05), add 1.

Formula: ADDEACH('Growth Rate', 1)

Year

Growth Rate

→ ADDEACH Result

2024

0.03

1.03

2025

0.05

1.05

2026

0.02

1.02

Reverse a factor back to a percentage

Formula: ADDEACH('Factor', -1)

Year

Factor

→ ADDEACH Result

2024

1.03

0.03

2025

1.05

0.05

Compute the complement (1 − x pattern)

Goal: Compute 1 minus each value (e.g. if a share is 0.70, the complement is 0.30).

Why not 1 - 'Split'? In Valsight, that expression first rolls up 'Split' into a single total, then subtracts.

Solution: Negate first with 'Split' * -1, then add 1 to each entry.

Formula: ADDEACH('Split' * -1, 1)

Product

VarCostSplit

→ ADDEACH Result

A

0.70

0.30

B

0.60

0.40

Variable costs are 70 % / 60 % of total cost
The formula therefore yields the fixed-cost share (30 % / 40 %).

Flip 0/1 helper tables

To invert a binary helper table (1 → 0, 0 → 1), apply the same pattern.

Formula: ADDEACH('Original Values' * -1, 1)

Country

IS_EMEA

→ ADDEACH Result

DE

1

0

US

0

1

Useful when you need the logical opposite of an existing flag, e.g. turning an IS_EMEA flag into a NOT_EMEA flag.

Using a node as amount input

Instead of a fixed number, you can pass a second node.
ADDEACH then adds the values element-wise, matching on shared dimensions.
Where the Amount node has no matching value, the original Node value is kept unchanged. Rows that exist only in the Amount node are not included in the result.

Node

Year

Value

2025

10

2026

100

2028

50

AmountNode

Year

Value

2024

100

2025

150

2026

200

2027

250

Formula: ADDEACH('Node', 'AmountNode')

Year

→ ADDEACH Result

2025

160

2026

300

2028

50

Year 2024 and 2027 are absent because they only exist in AmountNode.
Year 2028 has no match in AmountNode, so the original Node value (50) is preserved.

The overlapping years are summed entry by entry:

10 + 150 = 160

100 + 200 = 300.


Related Functions

Function

When to use instead

ADDITION (+)

Adds two nodes after rollup.

MULTIPLICATION (*) / MULTIPLY

Element-wise multiplication counterpart.

ROLLUP

Aggregate values after element-wise operations.

EXPAND

Add dimensional detail before applying ADDEACH.

JavaScript errors detected

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

If this problem persists, please contact our support.