Skip to main content
Skip table of contents

YOY_REL

Basic Overview

Description

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

Syntax

YOY_REL(Node <, MissingValueBehaviour>)

Parameter

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

  • MissingValueBehaviour:

    • how the function should treat missing values

    • possible value are: IGNORE_MISSING (default) and MISSING_AS_ZERO

Examples

Input Profit =

Year

Value

2019

200

2020

300

2021

450

2022

500

2024

100

Output YOY_REL('Profit') = YOY_REL('Profit', "IGNORE_MISSING")

Year

Value

2020

(300 - 200) / 200 = 0.5

2021

150 / 300 = 0.5

2022

50 / 450 = 0.11

Here, the function outputs the ratio between the difference (between the input year and the following year) and the value of the input year. The output shows how many percent the input year value grew to the following year’s value. The missing year 2023 is simply ignored and its following year 2024 is consequently not calculated.

Output YOY_REL('Profit', "MISSING_AS_ZERO")

Year

Value

2020

(300 - 200) / 200 = 0.5

2021

150 / 300 = 0.5

2022

50 / 450 = 0.11

2023

(0 - 500) / 500 = -1

2024

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

2025

(0 - 100) / 100 = -1

In this example, the results are mostly the same, although the missing years 2023 and 2025 are calculated as having the value 0. This leads to negative values for 2023 and 2025, as well as a zero division error for 2024.

Difference between YOY_REL(), YOY_ABS(), and RATIO(PY())

When aiming to compare values across time periods, there are three very similar ways to do so. At the first look, they appear to function in the same way; they do however possess small but important differences that can lead to vastly different results. For more information please refer to Difference between YOY_REL(), YOY_ABS(), and RATIO(PY())

JavaScript errors detected

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

If this problem persists, please contact our support.