SHIFT

SHIFT

AVAILABLE SINCE 3.9.0 Shift on non time levels is available since 3.9.0. Non time levels can only be shifted on the lowest level available in the input Node

Description

Shifts the input node node by a given offset amount on any dimension.

Signature

SHIFT(Node, LevelName, Node)

Parameters

  • Node: Input node that is shifted, specified using the node name in single quotes (e.g. 'Profit')
  • LevelName: Specifies the level in which the offset is described using the level name in double quotes (e.g. "Year"). The input node is required to have data on this level.

  • Amount: The offset to shift by. This parameter is joined with the Node parameter and will give the proper amount for each entry. This means that amount cube must match with the levels on the Node parameter.
  • New in version 3.7: Amount can be a node.
  • New in version 3.9: Shifts on any dimension are allowed.

Example 1

Input Profit

Year

Profit

2015

35

2016

42

2017

47

Output SHIFT('Profit', "Year", -1)

Year

Profit

2015

 

2016

35

2017

42

2018

47

Example 2

Input Profit

Year Product Profit
2018 Car 50
2018 Van 25

Input Shift Node

Product Amount
Car -1
Van -2

Output SHIFT('Profit', "Year", 'Shift Node')

Year Product Profit
2019 Car 50
2020 Van 25



Example 3


Available since: 3.7.0

Input Profit

Year Product Profit
2020 Car 100
2020 Van 200

2021

Car 120
2021 Van 220
2022 Car 150
2022 Van 250

Input Shift Node

Year Amount
2020 0
2021 1
2022 2

Output SHIFT('Profit', "Year", 'Shift Node')

Year Product Profit
2020 Car 370
2020 Van 670


Example 4


Available since: 3.9.0

Dimension: Vehicle

Vehicle

Category Body Type
0 Car Compact
1 Car Sedan
2 Van Transporter
3 Truck Trailer


Input Profit

Year Body Type Tax
2020 Compact 100
2020 Transporter 200

2020

Trailer 1200

Input Shift Node

Body Type Amount
Compact 1
Transporter 1
Trailer 0

Output SHIFT('Profit', "Body Type", 'Shift Node')

Year Body Type Tax
2020 Sedan 200
2020 Transporter 1200


Was this helpful?

Yes | Somewhat | No