# ADDITION (+)
URL: https://docs.valsight.ai/addition/
Description: The ADDITION operator adds two inputs after aligning them to their common dimensions. In other words, addition uses the intersection of the shared dimensions.
**Category:** [Arithmetic operators](/arithmetic-operators/)

## Overview

The **ADDITION** operator **adds two inputs** after aligning them to their **common dimensions**. In other words, addition uses the **intersection** of the shared dimensions.

The result keeps the **coarser** level in each shared dimension. Dimensions that exist on only one side are aggregated away.

Use this operator to combine values from two or more nodes.

## Syntax

`'Node1' + 'Node2'`

**Example usage:** `'Revenue BU1' + 'Revenue BU2'`

## Parameters

| Parameter | Description                                                         | Type           | Required |
| --------- | ------------------------------------------------------------------- | -------------- | -------- |
| **Node1** | First input node, specified in single quotes (e.g.`'Revenue BU1'`)  | Node reference | Yes      |
| **Node2** | Second input node, specified in single quotes (e.g.`'Revenue BU2'`) | Node reference | Yes      |

## Output shape

| Aspect             | Behavior                                                                                                                                                                                                                    |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Dimensionality** | Both inputs are aggregated to their **common dimensions** (the **intersection** of the shared dimensions). Per shared dimension, the **coarser** level is used. Dimensions that exist on only one side are aggregated away. |
| **Level values**   | Non-matching level values are preserved in the result.                                                                                                                                                                      |
| **Row count**      | Equal or reduced, depending on how much aggregation is required before adding.                                                                                                                                              |

## Watch out

* Addition uses the **common dimensions** (**intersection**), not the combined dimension set. This is different from multiplication and division.
* When adding a constant such as `'Revenue' + 100`, the node is aggregated first and the constant is then added to the total.
* To add a value to each entry before aggregation, use [ADDEACH](/addeach/) instead.
* Both sides must have the same unit, unless one side is a scalar value.

## Examples

### Adding nodes with different dimensionality

This example shows how addition aggregates `Node B` to the common dimensions before adding it to `Node A`.

**Input node:** `'A'`

| Year | Value |
| ---- | ----- |
| 2025 | 5     |
| 2026 | 10    |

**Input node:** `'B'`

| Year | Product | Value |
| ---- | ------- | ----- |
| 2025 | A       | 2     |
| 2026 | A       | 3     |
| 2026 | B       | 4     |

**Formula:** `'A'+'B'`

| Year | Calculation | Result |
| ---- | ----------- | ------ |
| 2025 | 5+2         | 7      |
| 2026 | 10+3+4      | 17     |

### Adding nodes with different level values

When level values do not overlap, addition preserves both values in the result.

**Input node:** `'A'`

| Year | Value |
| ---- | ----- |
| 2025 | 5     |

**Input node:** `'B'`

| Year | Value |
| ---- | ----- |
| 2026 | 10    |

**Formula:** `'A' + 'B'`

| Year | ADDITION Result |
| ---- | --------------- |
| 2025 | 5               |
| 2026 | 10              |

### Adding a constant to a node

When one operand is a constant, the node is aggregated first and the constant is then added to the total.

**Input node:** `'Sales'`

| Year | Product | Value |
| ---- | ------- | ----- |
| 2025 | A       | 30    |
| 2025 | B       | 20    |

**Formula:** `'Sales' + 100`

| Year | Calculation   | Result |
| ---- | ------------- | ------ |
| 2025 | 30 + 20 + 100 | 150    |

## Related

| Function                         | When to use instead                                                                                          |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| [UNION](/union/)                 | When both nodes have the same levels and you want to enforce that constraint (stricter version of ADDITION). |
| [ADDEACH](/addeach/)             | When you need to add a value to each individual entry before aggregation, rather than combining two nodes.   |
| [SUBTRACTION (-)](/subtraction/) | When you need tosubtract nodes instead of adding them. Uses the same roll-up logic.                          |
