# Rearranging Example

## Setup

For our forecast periods (2023 onwards), we want to calculate `Revenues` <mark style="color:green;">**(1)**</mark> as an output, so we start with a simple calculation, `Revenues = Widgets Sold * Price` <mark style="color:green;">**(2)**</mark>.

<figure><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2F94NQidqmQJQtDmNWlCrg%2Fimage.png?alt=media&#x26;token=698a59a5-d896-4a5c-ae63-4cc4b5a0a619" alt=""><figcaption><p><code>Revenues</code> Variable before rearranging</p></figcaption></figure>

We set up our `Widgets sold` Variable so that we need to enter [**Assumptions**](https://help.taglo.io/assumptions) for 2021 and 2022 <mark style="color:green;">**(3)**</mark>, and from 2023 onwards `Widgets sold` will be equal to the previous period <mark style="color:green;">**(4)**</mark>. However, we don't know how many Widgets were sold in 2021 and 2022, so we cannot initially calculate `Revenues`, meaning we have blank values in our output <mark style="color:green;">**(5)**</mark>.

<figure><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FHBG1yozAYdCW0U1ZrZNV%2Fimage.png?alt=media&#x26;token=95016b58-977c-45c8-9d96-0da62dd1b501" alt=""><figcaption><p><code>Widgets sold</code> Variable before rearranging</p></figcaption></figure>

## Entering Actual Revenues

We know what our revenues were for 2021 and 2022, so we create a [**new Time Segment**](https://help.taglo.io/variables/time-segments/time-segment-setup#creating-editing-time-segments) in our `Revenues` Variable <mark style="color:green;">**(6)**</mark>, with an `Assumptions` [**formula type**](https://help.taglo.io/variables/time-segments/time-segment-setup#formula), and add our historical revenues data to this Time Segment.

<figure><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FiMkMKBD78ZGwDQsFvlLF%2Fimage.png?alt=media&#x26;token=e51edf79-2e77-4840-90e0-f4f135e1fb93" alt=""><figcaption><p><code>Revenues</code> Variable after entering Assumptions for 2021 and 2022</p></figcaption></figure>

Models now sees that for 2021 and 2022, it is expecting input data for all three Variables, `Revenues`, `Widgets sold` and `Price`. This is not a valid state, as in any [**Calculation**](https://help.taglo.io/calculations) there must be exactly one unknown Variable to be calculated, otherwise there is the potential for conflicts (i.e. we could enter values for the three Variables that do not match the Calculation `Revenues = Widgets sold * Price`).

To rectify this, Models displays a message on the first Time Segment of `Revenues` <mark style="color:green;">**(7)**</mark>, warning that a "Child needs to be rearranged for this segment". We can read this as saying that one of the input Variables, `Widgets Sold` or `Price` needs to become the output of the Calculation to maintain logical consistency.

## Rearranging

To rearrange the segment, we simply click the **Resolve** <img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FcfiFcrjifcyFrvZezxKW%2Fimage.png?alt=media&#x26;token=76e206a2-3b63-4891-b776-14213c92812a" alt="" data-size="line">button <mark style="color:green;">**(8)**</mark>, which opens a new dialog, shown below.

We are offered a choice of child Variables to rearrange. We need to select the Variable that we want to be used as the new output of the Time Segment. In this case, we know the price, but we don't know the number of widgets sold, so we select `Widgets sold` as the new output <mark style="color:green;">**(9)**</mark>.

<figure><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2F94VWa6cVsf6c2qQMR6SV%2Fimage.png?alt=media&#x26;token=bd290cd0-d441-480e-a832-8fceb5c56e6e" alt=""><figcaption><p>Rearranging dialog</p></figcaption></figure>

This results in the below state, where we no longer have warnings in our Variables. The first Time Segment for `Widgets sold` has been rearranged, with a Calculation of `Revenues / Price` <mark style="color:green;">**(10)**</mark>.

<figure><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FbRf3HylQVCjSEyiMqWeB%2Fimage.png?alt=media&#x26;token=98d61ff3-409f-4e54-93ea-5b0cbef71121" alt=""><figcaption><p><code>Widgets sold</code> Variable after rearranging</p></figcaption></figure>

`Widgets sold` is now calculated from `Revenues` and `Price` for 2021 and 2022, and is static thereafter.&#x20;

{% hint style="info" %}
Note that the **Values** table visually indicates the change in calculation method with a border to the right of the 2022 period <mark style="color:green;">**(11)**</mark>.
{% endhint %}
