Skip to main content
Skip table of contents

YOY_REL

Category: Compare periods

Overview

Description

Returns the relative growth for each year compared to the previous year (year-over-year).

Use this when you need the percentage change between consecutive years.

Syntax

YOY_REL('Node' [, "MissingValueBehaviour"])

Parameters

  • Node: Input node, specified in single quotes (e.g. 'Profit')

  • MissingValueBehaviour (optional): How missing values are treated.

    • "IGNORE_MISSING" - Missing rows are skipped. This is the default.

    • "MISSING_AS_ZERO" - Missing rows are treated as 0. Note: this can cause division by zero errors.


Examples

Default: ignoring missing values

This example shows YOY_REL with the default behavior. The missing year 2029 is skipped and its following year 2030 is not calculated.

Input node: Profit

Year

Value

2025

200

2026

300

2027

450

2028

500

2030

100

Formula: YOY_REL('Profit') = YOY_REL('Profit', "IGNORE_MISSING")

Year

→ YOY_REL Result

2026

(300 - 200) / 200 = 0.5

2027

150 / 300 = 0.5

2028

50 / 450 = 0.11

The function outputs the ratio between the difference and the previous year's value. The missing year 2029 is ignored and 2030 is not calculated.

Treating missing values as zero

With MISSING_AS_ZERO, gaps are filled with 0. This produces results for every year but can cause division by zero when the previous year has no data.

Formula: YOY_REL('Profit', "MISSING_AS_ZERO")

Year

→ YOY_REL Result

2026

(300 - 200) / 200 = 0.5

2027

150 / 300 = 0.5

2028

50 / 450 = 0.11

2029

(0 - 500) / 500 = -1

2030

(100 - 0) / 0 = division by zero results in entry not being present in result

2025

(0 - 100) / 100 = -1

The missing years 2029 and 2025 are calculated as having value 0. This leads to negative values for 2029 and 2025, and a division by zero error for 2030.


Related Functions

Function

When to use instead

YOY_ABS

When you need the absolute difference to the previous year instead of a percentage.

DELTA_REL

When you need relative change along any dimension, not just time.

CAGR

When you need compound growth over multiple periods instead of a single-period comparison.

JavaScript errors detected

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

If this problem persists, please contact our support.