Skip to main content
Skip table of contents

REBOOK

Basic Overview

AVAILABLE SINCE 5.3.0

Description

The REBOOK function can be used in all situations where value measures need to be “booked” to a different value in the same level. The FilterOperation allows further specifications on which level values should be rebooked.

Signature

REBOOK('Node', "Level", "OldValue", "NewValue" <, "FilterOperation">)

Parameters

  • Node: Input node

  • Level: The level in the input node that shall be re-booked. 

  • OldValue: The existing value which value measure shall be rebooked (moved). This can either be a single value or a list of values

  • NewValue: The target value of the rebook. This should be a single string value.

  • FilterOperation: The indicator for the FilterOperation is the “OldValue” entered in the formula

    • "EQ"(equality) - (Default)

    • "NEQ"(Not equals)

    • "GT"(greater than)

    • "GTE"(greater than or equals)

    • "LT"(less than)

    • "LTE"(less than or equals).

All FilterOperations can be found on this documentation page.

Limitations

  • OldValue and NewValue must be level values of the same level inserted in the formula. 

  • If the node contains linked levels, it is not possible to rebook values of the linked-to dimension. Rebooking these values should be done via the initial dimension that the other dimension is linked to. Then all values are valid.

  • Important: This function always keeps linked levels between dimensions.

  • Do not use this function if you want the node to have different linked levels than the initial dimension.

Explanations of FilterOperations:

  • EQ = The measures of the level value equal to the “OldValue” are rebooked to the “NewValue” (default)

  • NEQ = All measures of the level values not equal to the “OldValue” are rebooked to the “NewValue”

  • GT = All measures of the level values greater than the “OldValue” are rebooked to the “NewValue”

  • GTE = All measures of the level values greater than or equal the “OldValue” are rebooked to the “NewValue”

  • LT = All measures of the level values less than the “OldValue” are rebooked to the “NewValue”

  • LTE = All measures of the level values less than or equal the “OldValue” are rebooked to the “NewValue”

The “OldValue” is the leading indicator. As the dimension list is sorted in a lexicographic order, “greater” targets all levels that start with a letter that alphabetically comes after the first letter of the “OldValue”.


Example

Before:

Revenue:

Year

Segment

Revenue

2020

MINI

100

2020

COMPACT

 50

2020

LARGE

 10


After:

Example 1:

REBOOK('Revenue', “Segment”, “MINI”, “LARGE”) =

Year

Segment

Revenue

2020

MINI

0

2020

COMPACT

50

2020

LARGE

110

With this formula, the value measure of 'MINI' is rebooked to 'LARGE'. 

As LARGE already had a revenue of '10', the rebooked value of '100' is added (=110).

Calculation:

Year

Segment

Revenue

2020

MINI

100 (-100)

2020

COMPACT

 50  

2020

LARGE

 10 (+100)






Example 2:

REBOOK('Revenue', "Segment", [“MINI”, “COMPACT”], “LARGE”) =

Year

Segment

Revenue

2020

MINI

0

2020

COMPACT

0

2020

LARGE

160

With this formula, the value measures of 'MINI' and 'COMPACT' are rebooked to 'LARGE'. 

The 'OldValue' measures are combined and add up to the measure of 'LARGE'.

Calculation:

Year

Segment

Revenue

2020

MINI

100 (-100)

2020

COMPACT

 50 (-50)

2020

LARGE

 10 (+100+50)



Example 3:

REBOOK('Revenue', “Segment”, “MINI”, “LARGE”, “NEQ”)

Year

Segment

Revenue

2020

MINI

100

2020

COMPACT

 0

2020

LARGE

60

As the FilterOperation is set to “NEQ”, all measures of the levels not equal to the “OldValue” (MINI) are rebooked to the “NewValue” (LARGE).

Calculation:

Year

Segment

Revenue

2020

MINI

100

2020

COMPACT

 50 (-50)

2020

LARGE

 10 (+50)

JavaScript errors detected

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

If this problem persists, please contact our support.