# Introduction to ValQ

ValQ is a lightweight, multi-purpose application running on Power BI that can support planning, budgeting, time series forecasting, value driver planning, reporting, and presentation. It helps enterprises run simulations, plans & analyses in a very visual and intuitive manner.&#x20;

It is designed keeping in mind the analysis & decision-making needs of business users & executives without any dependencies on IT.

### Use cases of ValQ

* Business Modeling & Calculations
* Planning
* Budgeting
* Forecasting
* Financial Planning & Analysis
* Time Series Forecasting
* What-if Simulations
* Scenario Comparison
* Scenario Analysis
* Variance Analysis
* Value Driver Analysis
* Executive Reporting

### How ValQ matches your role?

ValQ is for everyone ranging from C-suite executives to analysts across departments and functions. How you use ValQ depends on your role in the team or project.

Explore use cases that pertain to your role:

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><a href="https://valq.com/c-suite/"><strong>C-Suite</strong></a></td><td></td><td></td><td><a href="/files/LMOcpB0vWOlcgRmBsUl1">/files/LMOcpB0vWOlcgRmBsUl1</a></td></tr><tr><td><a href="https://valq.com/decision-makers/"><strong>Decision Makers</strong></a></td><td></td><td></td><td><a href="/files/9QhoT0B8s9G5d7hOtc8C">/files/9QhoT0B8s9G5d7hOtc8C</a></td></tr><tr><td><a href="https://valq.com/analysts/"><strong>Analysts</strong></a></td><td></td><td></td><td><a href="/files/Ncojtp24o5MLRxcUk1ZE">/files/Ncojtp24o5MLRxcUk1ZE</a></td></tr></tbody></table>

### Solutions by Functions

ValQ supports use cases across various departments and functions such as

* [Finance](https://valq.com/finance/)
* [Sales & Marketing](https://valq.com/sales-marketing/)
* [Supply Chain](https://valq.com/supply-chain-planning/)
* [Procurement](https://valq.com/procurement/)
* [Human Resources](https://valq.com/human-resources/)

Click on the relevant functions above to know more.

{% hint style="info" %}
ValQ extends its functionality beyond financial & operations planning.
{% endhint %}

For example,

1. A customer service representative can leverage ValQ to simulate headcount needs based on estimated growth in call volume, upcoming product launches, marketing campaigns, and more.<br>
2. A marketing manager can leverage ValQ to analyze web traffic, online assets, conversion rates, etc. to calculate marketing ROI.

**ValQ Enterprise edition** has exclusive data persistence and security features ideal for Enterprise collaboration and Advanced analysis. To learn more, contact [support](https://valq.com/contact-us/).

### What do I need to run ValQ?

{% hint style="info" %}
All you need is Microsoft Power BI to run ValQ.
{% endhint %}

ValQ is an independent solution that does not require any additional infrastructure, database, service, or IT support (except for the ValQ On-Premises Plan).

<figure><img src="/files/WRUiVJF28xDswuqKVu0n" alt="" width="375"><figcaption></figcaption></figure>

You can download Microsoft Power BI desktop [here](https://powerbi.microsoft.com/en-us/downloads/).

### Sources ValQ can connect to

ValQ connects to all databases, platforms, and other data sources supported by Power BI.

<figure><img src="/files/HInJyrPsZHOEFvky2SgO" alt=""><figcaption></figcaption></figure>

### Where can I learn more about ValQ?

Go to the [Resources](/resources) section for more information on ValQ.


# Get ValQ

A step-by-step guide to get started on ValQ

You can try ValQ for free or purchase licenses through the two ways listed below:

1. **Microsoft AppSource** - for seamless license procurement and administration using Microsoft's framework and for use in Power BI Desktop and Service.
2. **ValQ website** - for free trials without credit card, license purchase for use in Power BI Report Server, or for Embedded or OEM applications.

## 1. Microsoft AppSource <a href="#import-a-power-bi-visual-directly-from-appsource" id="import-a-power-bi-visual-directly-from-appsource"></a>

Free trials are available through Microsoft AppSource *only for certain pricing tiers*.

* To download a free version (only for Power BI Desktop), follow the steps [here](https://learn.microsoft.com/en-us/power-bi/developer/visuals/import-visual).
* To purchase and manage licenses through Microsoft [AppSource](https://appsource.microsoft.com/marketplace/apps?page=1\&product=power-bi-visuals), read this [blog](https://powerbi.microsoft.com/en-au/blog/introducing-a-new-way-to-purchase-licensed-power-bi-visuals-and-manage-licenses-through-microsoft-platforms/).&#x20;
* For FAQs on Microsoft AppSource purchase, visit this [page](https://learn.microsoft.com/en-us/power-bi/developer/visuals/licensing-faq).

## 2. ValQ Website

You can also register for a [trial](https://valq.com/trial/) through the ValQ website.

## a) Download ValQ

If you have registered for a trial or [paid](https://valq.com/pricing/) subscription to ValQ via [Microsoft AppSource](https://appsource.microsoft.com/en-us/product/power-bi-visuals/valq.valqplan?tab=Overview), the visual is already embedded with a unique dynamically generated license key and you can start using ValQ right away.

In case you have registered for a [trial](https://valq.com/trial/) via ValQ website, you will receive an email with a license key and a link containing the steps to download the visual from AppSource.

## b) Install ValQ

There are 2 different methods to deploy ValQ in Power BI:

#### 2.1. Install for yourself

* You can use this option to install the visual on your own in Power BI desktop or service, without help from your IT or Power BI administrator.

For instructions, visit this [page](https://valq.com/get-started/).

#### 2.2.  Install for your Organization (Organizational Visual)

* Under this option, your Power BI Administrator uploads ValQ to the **Organizational Custom Visual (OCV).**
* Once uploaded, the custom visual becomes available to all users within your organization who log on to Power BI. They need not have to individually install or update visuals.
* Any future updates done to the visual – when uploaded to the repository by the administrator – will automatically update all the reports in your organization.

For instructions, visit this [page](https://valq.com/get-started/).

## **Troubleshooting FAQ**

#### 1. 'I haven't received the welcome email'. <a href="#headline-437-2838" id="headline-437-2838"></a>

Make sure there are no spelling mistakes/typos in the mail ID used for the registration.

Check your spam folder or whitelist <no-reply@valq.com>.

If that doesn’t work, reach out to your IT team and ask them to whitelist the domain at the firewall level. You will start receiving subsequent emails from us in your inbox.

#### 2. 'When I click elsewhere, the license key entered disappears/license key does not get accepted'

* Before adding the license key, you need to assign at least one data field to the visual in the Power BI Visualisations pane. This preserves the key entered in the License Key field.
* Please ensure the license key entered is still valid and has not expired.

#### If you still have difficulties, please contact us [here](https://valq.com/contact-us/) or through [mail](mailto:support@valq.com).

If you have any other queries, reach out to us through [ValQ Community](https://community.valq.com/). Paid customers can also send an email to the ValQ support team (**mentioned in your purchase email**).

In the next sections, we'll be looking at a step-by-step approach to [working with ValQ.](/introduction-to-valq/the-valq-workflow)


# The ValQ Workflow

The ValQ workflow consists of four steps - Model, Plan, Simulate and Report – all of which are available as individual tabs at the top.

<figure><img src="/files/1DWjA0rbWjBYDwvB6iSI" alt="" width="375"><figcaption><p><strong>Tabs in ValQ</strong></p></figcaption></figure>

Let us see an overview of these tabs:

<table><thead><tr><th width="81"></th><th width="155">TAB</th><th>PURPOSE</th></tr></thead><tbody><tr><td>1</td><td><a href="/pages/UIyMkhcQOmhVgSwCMneu">Model</a></td><td>Create models based on your business logic by leveraging ValQ's model building capabilities, functions and templates.</td></tr><tr><td>2</td><td><a href="/pages/m5pVMrHM40kXCKGYrxyO">Plan</a></td><td>Adopt intelligent planning grid to perform budgeting, allocations, rolling forecast and time-series forecasting.</td></tr><tr><td>3</td><td><a href="/pages/R9nS1Q8XeuSGt8MvIyHO">Simulate</a></td><td>Perform on-the-fly simulations, conduct scenario analysis and comparisons in tree/ table interface and also present them. </td></tr><tr><td>4</td><td><a href="/pages/vTAaX4j0fqxvbt3TP9qz">Report</a></td><td>Perform in-depth variance analysis including Top N and generate templated reports.</td></tr></tbody></table>

{% hint style="info" %}
In Power BI service, Model and Plan tabs can be accessed by changing the mode from Read-Only to **Edit** (Click Edit at the top of Power BI service). This helps in data integrity by preventing multiple users from altering the model and plan grid.&#x20;

Business users who require strict access permissions can use ValQ preferably in Power BI service than in a desktop version, so that they can make use of the default Power BI roles and access permission settings.

Users can also use the **Enterprise** edition for better user and data security.
{% endhint %}

What follows is a preview of these workflow items and we'll explore them in detail later.

{% hint style="info" %}
*ValQ can be used with other native and custom Power BI visuals, but throughout this guide, we will be using ValQ images in full-screen mode for the best experience.*
{% endhint %}

### Model

The Model tab helps the analyst or the planner bring a data model to life and build complex visuals without writing a single line of code.

<figure><img src="/files/t5Ms1WVohFWEz0a0Xl5t" alt=""><figcaption><p><strong>Model Tab</strong></p></figcaption></figure>

While modeling, the user can leverage the Fields, Visualizations & Filters pane in Power BI to connect to data and configure the visual. By choosing appropriate [formulas and functions](/model/formula-functions), a fully functional model can be built. Further, [templates](/model/templates) help in scaling the model with ease.<br>

<figure><img src="/files/RDKmumaHhZ5LUhNSivJ2" alt="" width="563"><figcaption><p><strong>Leveraging Model with Fields &#x26; Visualizations pane</strong></p></figcaption></figure>

### Plan

The Plan tab is used to create new plans and budgets for business cycles, perform top-down and bottom-up analyses using goal seek, apply different allocation methods, and perform time series forecasting.

<figure><img src="/files/sKu6iO6mHJLPYujhrR26" alt=""><figcaption><p><strong>Plan Tab</strong></p></figcaption></figure>

### Simulate

In the Simulate tab, you would be able to visualize the KPIs and identify their key drivers arranged in a tree-like fashion. From this tab, you can create new initiatives and scenarios, run simulations, and perform scenario comparisons. You can also present the results to your team using the **Presentation** option available.

<figure><img src="/files/N1mWvdrI1BPE2G15gUuK" alt=""><figcaption><p><strong>Simulate Tab</strong></p></figcaption></figure>

### Report

The Report tab allows the user to run advanced analysis such as variance analysis as well as download the results of the analysis as reports in a spreadsheet and PDF file.

<figure><img src="/files/w2GNozwBAs1ypWfAJ7uc" alt=""><figcaption><p><strong>Report Tab</strong></p></figcaption></figure>


# Model

Build your business models with ease using ValQ's Model Tab

Model tab is the first tab on ValQ where you can create the structure of your model and configure the node properties for your business-specific use case.

<figure><img src="/files/QiAcQMqocfOR68RxD8YI" alt="" width="375"><figcaption><p><strong>Select Model Tab</strong></p></figcaption></figure>

To understand the Model tab, its features have been explained in these major sections:

1. [Create Model](/model/create-model)
2. [Model Editor](/model/model-editor)
3. [Node Settings](/model/node-settings)
4. [Templates](/model/templates)
5. [Formula Functions](/model/formula-functions)
6. [Global Settings](/model/global-settings)

Let us have an overview of each section.

{% hint style="info" %}
In the Power BI service, the model tab is available only in the **Editing view**.

To view the model in the reading view, you can enable this option - '**Enable Model tab in the Reading view'** in the [**Settings**](https://docs.valq.com/pages/9dRQlKNML0z3zNWEfNgv#1.1.-about-model) menu.&#x20;
{% endhint %}

## 1. Create Model

The first step is to choose how you would like to begin building the ValQ model. We'll look into the three ways to create a new model.

<figure><img src="/files/1auzj1XgKu5sib8epBz2" alt="" width="563"><figcaption><p><strong>Three ways to Create Model</strong></p></figcaption></figure>

## 2. Model Editor

Editing a model involves structuring the entire layout of the model and setting up each node using features such as formulas, templates, bulk edit, node settings, display properties, and more.

<figure><img src="/files/PeZm7QUZUAjeMUdjBzGP" alt=""><figcaption><p><strong>Model Editor</strong></p></figcaption></figure>

## 3. Node Settings

Editing the model requires editing and configuring the node properties such as node name, type, configuration, simulation method, etc. - all of which are available in the [Node Settings](/model/node-settings) window.

<figure><img src="/files/MrYjizKNOeWclQl1pEvD" alt=""><figcaption><p><strong>Node Settings window</strong></p></figcaption></figure>

## 4. Templates

While building a model, you can make use of the Template feature whenever you need to create a repetitive node structure. Templates are discussed in detail in [this section](/model/templates).

## 5. Formula Functions

In this section, you can find information about [Functions and Formula](/model/formula-functions) keywords.

## 6. Global Settings

You might need to use the Settings menu on the toolbar for configuring the global level settings of the visual anytime during the ValQ workflow. This is explained separately in the section [Global Settings. ](/model/global-settings)

<figure><img src="/files/VheCpbnOMdGKJhwRutE0" alt=""><figcaption><p><strong>Settings</strong></p></figcaption></figure>

While we explore each of the above sections in the upcoming pages, let us first learn to get data into ValQ.


# Get Data

This guide is designed to provide you with the steps to get data inside ValQ with the help of an example - the Sales Performance Dataset (you can download the file below). If you have not installed ValQ already, see the installation guide [here](/introduction-to-valq/get-valq). You can also use your own datasets and follow the steps outlined.

{% file src="/files/i1IEp7mDjmsgapflTtY5" %}

{% hint style="info" %}
Excel dataset is used here for the purpose of illustration only. ValQ supports all formats of databases, platforms and data sources supported by Power BI.
{% endhint %}

## Step-by-Step Guide

Let us learn how to get data inside ValQ to build models.

1. Add the visual
2. Import data from Excel
3. Assign your data fields to ValQ

### 1. Add the visual

The first step to using ValQ is to add it to the Power BI canvas. Click on the ValQ icon in the visualization pane.&#x20;

<figure><img src="/files/L7WzrJMI2JYdMTd2Gjsm" alt=""><figcaption><p><strong>Select ValQ</strong></p></figcaption></figure>

Resize it to fill the entire screen.

<figure><img src="/files/dyia3x0X1HMQXEpj9jc5" alt=""><figcaption><p><strong>Resize ValQ to Fullscreen</strong></p></figcaption></figure>

### 2. Import data from Excel

We have a simple columnar dataset as shown below that measures sales performance across regions, and product categories & with respect to sales representatives.

<figure><img src="/files/4Nqk8WdaXtOLnGYvD6kR" alt=""><figcaption><p><strong>Sample Data</strong></p></figcaption></figure>

This is a columnar dataset as the data is stored in columns instead of rows. Download the dataset using the above link and try it yourself.

1. To import this data into Power BI, go to **Get Data** in the toolbar. Now choose **Excel Workbook** to import the sales data. The process is the same as importing any data to Power BI.

<figure><img src="/files/xaOEUT3iAAE1IsKYTKne" alt=""><figcaption><p><strong>Get Data from Excel</strong> </p></figcaption></figure>

{% hint style="info" %}
ValQ consumes data the best when it is structured in **columnar** format. If the data is of any other structure such as a Crosstab, convert the data into columns at the source as a best practice. You can also use Power BI Query Editor to transform the data before loading it to ValQ.
{% endhint %}

2. Go to the file location and select the file to be imported. Click **Open.**

<figure><img src="/files/daezE9vLbVb7026j0cz0" alt=""><figcaption><p><strong>Select Excel File through System Dialog Box</strong></p></figcaption></figure>

3. Select the *Sales Data(Columnar)* checkbox to preview the dataset and click **Load.** No transformation is required for this data as it is already prepared.

<figure><img src="/files/A1KFnxE1svpiGoy8fXoA" alt=""><figcaption><p><strong>Preview and Load Data</strong></p></figcaption></figure>

4. You will now see the dataset under the **Data** pane on the right.

<figure><img src="/files/W6jGIeBIEMdwEtniCApd" alt=""><figcaption><p><strong>Loaded Dataset</strong> </p></figcaption></figure>

### 3. Assign your data fields to ValQ

Now that you have the data imported, the next step is to assign them to the appropriate fields. The available fields include **Category**, **Time Period**, **Values** and **Others.**

<figure><img src="/files/tWBvSTEPSUQbRTHEnUzF" alt=""><figcaption><p><strong>Assign Data Fields</strong></p></figcaption></figure>

1. Assign *Category* and *Region* in **Category** field.&#x20;
2. Then add *Month* in the **Time Period** field.&#x20;

{% hint style="info" %}
The example showcased here has a hierarchical time format and hence time interval mapping is not required. ValQ accepts non-hierarchical time periods as well. Refer to [this section](https://docs.valq.com/model/pages/9dRQlKNML0z3zNWEfNgv#1.3.-time-interval-mapping) to know more.
{% endhint %}

3. *Sales Budget* and *Sales Forecast* are added to the **Values** field.&#x20;
4. You can also assign one of these values to the **Others** field. They would not become a part of the data series but can be used in formulae in the Model tab and for weight distributions in the Plan tab.

For example, in the below image, the *Sum of Sales Budget* is assigned to the **Others** field instead of the **Values** field. This makes the series unavailable in the visual - in Plan, Simulate and Report tabs. However, in Model tab, you can refer to this series in formula calculations.

<figure><img src="/files/NK6d2Lxff2gAJw8Xxjvi" alt="" width="344"><figcaption><p><strong>Others Field</strong></p></figcaption></figure>

**Note:**

1. In the **Category** field, you can assign the category names, sub-categories and other heads under which you want the data to be categorized.
2. In the **Time Period** field, you can assign the time frame in which your data has been aggregated like Year, Quarter, Month, Week, Days, etc., Both hierarchical and non-hierarchical time formats are accepted.

{% hint style="info" %}
ValQ accepts non-hierarchical custom time formats like FY2023, 23, Qtr1, Jan, etc. and for the visual to consume data in such time formats use the **Time Interval Mapping** feature as explained in [this section](https://docs.valq.com/model/pages/9dRQlKNML0z3zNWEfNgv#1.3.-time-interval-mapping).&#x20;

You can also split the data series by year using the [Split Series by year](https://docs.valq.com/model/pages/9dRQlKNML0z3zNWEfNgv#1.2.1.-series-manager) option.
{% endhint %}

3. All the numerical value columns that you want to aggregate can be assigned to the **Values** field.
4. Assign data in the **Others** field which you do not want to be added as an exclusive data series but want it to be still available for formula calculations and weight distributions.

You have now imported your data to ValQ. Take some time to explore further. In the next section, let us learn the steps to create a model.

**Resources**

[**How to use Cross-Tab Data for ValQ Model in Microsoft Power BI**](https://valq.com/webinars/how-to-use-cross-tab-data-for-valq-model-in-microsoft-power-bi/)

[**Create ValQ Model in Microsoft Power BI with 2 FACT Tables**](https://valq.com/webinars/create-valq-model-in-microsoft-power-bi-with-2-fact-tables/)

**Note:** While the resources above are from previous versions of ValQ, the information available also applies to the current version of ValQ - Plan.

ValQ packages a few inbuilt examples as samples. To explore more such models and use cases, visit [Demos](https://valq.com/demos).


# Create Model

In the launch screen of the visual, there are two options for you to get started with ValQ.&#x20;

-> If you are new and want to explore ValQ, Click **Select Sample** to explore the Sample models.

-> If you are ready to build models using your own data set, click **Create Model.**

<figure><img src="/files/yeMBDXucR4EFt0GZhz0R" alt=""><figcaption><p><strong>ValQ Launch Page</strong></p></figcaption></figure>

### Create New Model

Upon clicking **Create Model**, you have three types of models to choose from and start modeling.

<figure><img src="/files/PP7LS87ZCWFQuWgrEbI0" alt="" width="563"><figcaption><p><strong>Three ways to Model</strong></p></figcaption></figure>

* [Dynamic Model](/model/create-model/dynamic-model) - ValQ automatically creates a model from the data assigned to it.
* [Custom Model](/model/create-model/custom-model) - It is used when you want to build the model manually from scratch.
* [Import a Model](/model/create-model/import-a-model) - This option can be used to import an existing model that is already built and exported. To learn about exporting a model, click [here.](https://docs.valq.com/model/pages/9dRQlKNML0z3zNWEfNgv#3.-export)

Let us learn in detail about each of the above model types in the upcoming sections.


# Dynamic Model

A Dynamic Model gets built from the data source, instantly at the click of a button. The structure of the model is taken from the categories assigned to the visual and each level adds up one over the other.&#x20;

After importing the data using the steps explained in the [Get Data](/model/get-data) section, choose **Dynamic Model** and click **Create**.

<figure><img src="/files/fLL35l6i33Ld48t2YEKy" alt=""><figcaption><p><strong>Creating Dynamic Model</strong></p></figcaption></figure>

{% hint style="info" %}
**Dynamic Model** option gets enabled only after you have assigned Category and Values fields to the visual.
{% endhint %}

Dynamic model gets built instantly as shown below.

<figure><img src="/files/sNgDdYYaWiNc0DnXOfr8" alt=""><figcaption><p><strong>Dynamic model -  Example</strong></p></figcaption></figure>

This type of model is termed dynamic as ValQ automatically updates your model whenever the categories are added, removed, or re-arranged. Since Dynamic models are flexible in nature they can be immensely useful for **scaling** your model.

{% hint style="info" %}
Refer to [this section](https://docs.valq.com/model/create-model/pages/ILpN3IAHcg3C6utwcg9N#3.-assign-your-data-fields-to-valq) for more help on assigning fields to the visual.
{% endhint %}

The nodes on a dynamic model, referred to as dynamic nodes, are locked/disabled by default **except for the root node.** Ideally, you can not configure, move, or remove them.&#x20;

## Working with dynamic models

A Dynamic model can be edited while keeping its dynamic nature in the following ways.

## **1. Add Nodes to Root Node**

New nodes can be added to the root node in two ways.

1.1. Add nodes using Template

1.2. Add nodes using the 'Add New Node' option

### **1.1. Add Nodes Using Template**

In a dynamic model, new nodes can be added to the root node using templates. Refer to [this section](/model/templates/apply-template#add-template-as-new-nodes) to read more about it.

Find below the image of a dynamic model with a template added using **Add New Node-> Add Node using Template.**

<figure><img src="/files/rclxis4KMF8bQzNqiOfR" alt=""><figcaption><p><strong>Click 'Add Node using Template'</strong></p></figcaption></figure>

<figure><img src="/files/QX9WmMp9uWCj9pNqJ8fG" alt=""><figcaption><p><strong>Dynamic Model with Added Template Nodes</strong></p></figcaption></figure>

### **1.2.** Add Nodes using the 'Add New Node' option

New child nodes can also be added to the root node using the other options available in the **Add New Node** menu. Check out the steps [here](https://docs.valq.com/model/create-model/pages/FS2Kz9WTA6yhUl2VCcA9#1.-add-node) to learn how to add new nodes to the model.

<figure><img src="/files/isLyZ5K8RXc4lGyAmzfq" alt=""><figcaption><p><strong>Add New Node</strong></p></figcaption></figure>

The below image shows a dynamic model with a new node added through **Add New Node-> Text.**

<figure><img src="/files/tcvfwhUTqtvpOibfYXjq" alt=""><figcaption><p><strong>New Node Added</strong></p></figcaption></figure>

## 2. Replace/Insert Nodes with Template

You can edit the dynamic model using templates by way of replacing the existing nodes or just inserting the template nodes within the model. Let us see both the ways below.

### **2.1. Replace nodes using templates**

Replacing the existing dynamic node structure with template nodes is one of the ways to edit a dynamic model, without converting it. The template nodes are introduced in relation to the existing nodes while still keeping the entire model dynamic and locked for node-level edits. To learn about replacing dynamic nodes using templates, refer to [this section.](https://docs.valq.com/model/create-model/pages/PzgatPtXNNPVsb5orib0#1.-replace-dynamic-nodes-with-template)

Click on **Templates->Apply Template->Replace Nodes with** **Template** to replace dynamic nodes with templates.

<figure><img src="/files/X7zpx2NLEOkluuEO5vLB" alt=""><figcaption><p><strong>Apply Template->Replace Nodes with template</strong></p></figcaption></figure>

The below image shows a dynamic model where some nodes are replaced by template nodes as highlighted below.

<figure><img src="/files/byonQCsu1Lr415SQoxC2" alt=""><figcaption><p><strong>Dynamic Model replaced with template</strong></p></figcaption></figure>

### 2.2. Insert nodes using templates

Inserting template nodes at multiple levels within a dynamic model is another way to edit it. In this method, the existing dynamic nodes are not replaced but new nodes are inserted by way of templates wherever required. Refer to [this section](https://docs.valq.com/model/create-model/pages/PzgatPtXNNPVsb5orib0#2.-insert-custom-nodes-to-the-model) to know more.

Click on **Templates->Apply Template->Insert New Nodes with** **Template** to insert nodes within the dynamic model.

<figure><img src="/files/TOgFqPa8MHFYJmEhsoWx" alt=""><figcaption><p><strong>Apply Template->Insert New Nodes with Template</strong></p></figcaption></figure>

In the following example, the template ‘*Pastries*’ is added to the dynamic model at each *Region* level.

<figure><img src="/files/Km8xcqnRInwppaz31ZWK" alt=""><figcaption><p><strong>Dynamic model inserted with template</strong></p></figcaption></figure>

**Note:**

You can also click on the below icons to replace the nodes or insert them with template nodes.

<figure><img src="/files/Isy7q4rioKYc7vPPm9oj" alt=""><figcaption><p><strong>Replace / Insert with Template</strong></p></figcaption></figure>

## **Convert as Editable Nodes**

In this case, the model ceases to be dynamic when you convert it to an editable one. Following are the steps to convert:

In the Model Tab menu bar, choose **Convert Dynamic to Editable.**

<figure><img src="/files/pjW1q5JXh6QudUcfRvdl" alt=""><figcaption><p><strong>Convert to Editable Model</strong></p></figcaption></figure>

Click **Yes** to confirm.&#x20;

<figure><img src="/files/nShmz4xt2erylo8fTi8t" alt="" width="375"><figcaption><p><strong>Convert Dynamic Model</strong></p></figcaption></figure>

The model is now converted, enabling us to edit, configure, and customize the nodes as required.

<figure><img src="/files/LJwnfs56Gbbf56VrBgDW" alt=""><figcaption><p><strong>Converted to Editable Model</strong></p></figcaption></figure>

It is recommended that the model be converted only when required and as the last option.

**Note:**

1. The template structure within the model remains unalterable. To edit the template, you can use the **Templates** menu.
2. You can use the [Undo ](https://docs.valq.com/model/create-model/pages/GgVj5dX0kEHxZGXcbEbR#5.-undo-and-redo)<img src="/files/NUVTqhsBKpyB4GFl2XM4" alt="" data-size="line">option to convert an editable model back to a dynamic model.

{% hint style="info" %}
While converting a dynamic model makes it static, it provides various options to customize the model according to your needs.
{% endhint %}

To learn how to configure the nodes, you can refer to the [Model Editor](/model/model-editor) section.


# Custom Model

Custom Model lets you create a model from scratch manually.&#x20;

Select **Custom Model** and click **Create.**

<figure><img src="/files/lWjIaZk7gPCUNLUScldm" alt="" width="563"><figcaption><p><strong>Choose Custom Model</strong></p></figcaption></figure>

Once you click Create, a blank model is created where you can structure the model as per your requirements.

<figure><img src="/files/LV1IpTWYhRKWfp5Kh8lh" alt=""><figcaption><p><strong>Custom Blank Model</strong></p></figcaption></figure>

{% hint style="info" %}
For guidance on building models, please refer to the [Model Editor](/model/model-editor) section. This section is further divided into two sections - [Node Operations](/model/model-editor/node-operations) and [Editor Features](/model/model-editor/editor-features) which can assist you in creating a custom model of your choice.
{% endhint %}

{% hint style="info" %}
[Templates](/model/templates/apply-template#add-template-as-new-nodes) can also be used in a custom model where repetitive node structure is required.
{% endhint %}


# Import a Model

Import Model is used to import a previously built ValQ model into the new visual.&#x20;

{% hint style="info" %}
To learn how to export a model, refer [here.](https://docs.valq.com/model/create-model/pages/9dRQlKNML0z3zNWEfNgv#3.-export)
{% endhint %}

Select **Import Model** and click **Create.**

<figure><img src="/files/NxHClg03s8vkNNA4OgHc" alt="" width="563"><figcaption><p><strong>Import Model</strong></p></figcaption></figure>

&#x20;Select **Upload configuration file** in the pop-up screen.

<figure><img src="/files/ac85aIpGCeybgXc8ezqR" alt="" width="375"><figcaption><p><strong>Upload configuration file</strong></p></figcaption></figure>

Select the **.txt** file of the model you wish to Import and click **Open.**

<figure><img src="/files/KQoKP11fzU8eaFfjgrxl" alt=""><figcaption><p><strong>Click Open</strong> </p></figcaption></figure>

Map the data fields as displayed in the visual and click **Done.**&#x20;

<figure><img src="/files/Xang3qZdM9npHmMe0OVK" alt=""><figcaption><p><strong>Map the report data</strong></p></figcaption></figure>

The model is now imported to the ValQ visual.

<figure><img src="/files/I0FINaBDbXQuT1SRjIzh" alt=""><figcaption><p><strong>Imported ValQ model</strong></p></figcaption></figure>

Now that we have explored the different types of models that we can build using ValQ, let us have a closer look at how we can go about building them using the features available.


# Model Editor

This section details the concepts of building the node structure, editing the nodes, and making changes to the model.

To go to the Model Tab, click **Model** on the top left corner of the visual.

<figure><img src="/files/9fiiUmU2i11gszjXX78M" alt="" width="375"><figcaption><p><strong>Model Tab</strong></p></figcaption></figure>

This opens the model in the form of a grid where the nodes are listed in the model hierarchy along with their node properties. Find below the image of a custom model where the node structure can be customized and edited manually.

<figure><img src="/files/gzxJJOLFQiraQ9mgbWoi" alt=""><figcaption><p><strong>A sample editable model with template</strong></p></figcaption></figure>

Within this view, there are various editing options provided at the node level and the model level. They are explained in the sections [Node Operations](/model/model-editor/node-operations) and [Editor Features](/model/model-editor/editor-features). &#x20;

Let us start with the modeling features that are available with respect to nodes.


# Node Operations

In this section, we'll learn about the features that are specifically used for building the node structure.

## 1. Add Node

New nodes can be added to the model, one node at a time or as multiple nodes at one instance. We'll first learn how to add a single node and then move on to adding multiple nodes.&#x20;

### 1.1. Adding a Single Node

Next to every node, you can find a few icons and menu options. **Add Child Node** and **Add Sibling Node** are the options that help in adding new child nodes or sibling nodes respectively. **Add Child Node**<img src="/files/HndQO1ukjd4QJkBoaZLl" alt="" data-size="line"> is the first option next to the node name and **Add Sibling Node** ![](/files/L9CU6Uhr6sWWXbYWl4y6)  is available on the three dots menu (click on the three dots to access the menu).

Adding a sibling node adds a separate new node at the same level as the original node and not as a dependent.

<figure><img src="/files/sd2F0h0eNomzA4Vp3gDG" alt=""><figcaption><p><strong>Add Child and Add Sibling options</strong></p></figcaption></figure>

{% hint style="info" %}
**Note:** By default, new child nodes are added to the top node if the user does not select any node to add them to.
{% endhint %}

### 1.2. Adding Multiple Nodes

To add multiple new nodes to the model, click **Add New Node** on the toolbar. There are 4 different ways of adding multiple nodes - **Text, Data,** **Add Node using Template,** and **Constant Node.**

<figure><img src="/files/AwM7uTXMTluRM7ogeUQz" alt=""><figcaption><p><strong>Add New Node</strong></p></figcaption></figure>

#### **Text**

It is used to manually enter the node names that need to be added to the model.&#x20;

1. Select the node to which you want to add new nodes.
2. Navigate to **Add New Node** **-> Text** to open the **Add Nodes by Name** pop-up.&#x20;
3. In the text box, enter the name of the nodes you want to add.

<figure><img src="/files/lpCo2ARNAosSq0aa3qof" alt="" width="375"><figcaption><p><strong>Add Nodes by Name</strong></p></figcaption></figure>

4. To create a hierarchy, use the Tab key to insert child nodes.&#x20;
5. After entering the node names choose whether you want to add them as a child or as a sibling.
6. Click **Add** to add the nodes to the model.

#### **Data**

This option is used when you want to create nodes that have data source values. These nodes are also referred to as dynamic children as the child nodes are created to the top node dynamically.

1. Select the node to which you want to add new nodes.
2. Navigate to **Add New Node->Data** to open the **Add Nodes from Data** pop-up.
3. A list of source keys is displayed in a hierarchy as per the categories assigned to the visual.

<figure><img src="/files/8utW6LESy76sI2n66jLo" alt="" width="375"><figcaption><p><strong>Add Nodes from Data</strong></p></figcaption></figure>

4. Select the source key which you want to add to the model.
5. The selected source key's data source values are displayed as **Preview** at the bottom for all the data series (see the dropdown list in the image).

{% hint style="info" %}
In case the selected source key has children, all the descendant source keys will also be added as nodes in the same hierarchy.
{% endhint %}

6. After selecting the source key, you have the option to add the new nodes as a child or as a sibling.
7. Click **Apply** to add the nodes to the model.

#### **Add Node using Template**

Another way of adding new nodes is by using the template feature. After creating a template structure in the desired manner (Click [here](/model/templates#create-new-template) to learn about creating templates) you can add the template anywhere on the model.

1. Select the node to which you want to add new nodes.
2. Navigate to **Add New Node->Add Node using Template** to open the **Add Node from Template** pop-up.
3. In case there is no available template, you will be prompted to create a new template.

<figure><img src="/files/dMNaOAfDqBwES1pjThra" alt="" width="375"><figcaption><p>C<strong>reate New Template</strong> </p></figcaption></figure>

4. When there is an available template, the **Add Node from Template** pop-up is displayed. Select the template you want to add and the source key for which you want the template to fetch the values.

<figure><img src="/files/dBUDrpwQ9bxzrOJadG3d" alt="" width="375"><figcaption><p><strong>Add Node from Template</strong></p></figcaption></figure>

5. After selecting the source key, choose whether you want to add them as children or as siblings.
6. Click **Preview** to view the changes and then add the nodes to the model.

{% hint style="info" %}
Parent nodes of leaf nodes are only available for selection in the **Add Node from Template** dialog box while the leaf nodes become the template keys.
{% endhint %}

### 1.3. Adding a Constant Node

A constant node is a node that has a single value for its periods as well as the total. To add a constant node to your model,&#x20;

1. Select the node to which you want to add a new constant node.
2. Navigate to **Add New Node->Constant Node** to open the **Add Constant Node** pop-up.
3. Enter the name of the constant node and choose whether you want it to be added as a child or a sibling node.

<figure><img src="/files/xhdRT4b9FUdB609ffVAm" alt="" width="375"><figcaption><p><strong>Add Constant Node</strong></p></figcaption></figure>

4. Click **Add**.
5. **Time aggregation** and **adding child nodes** are **not applicable** for constant nodes.

<figure><img src="/files/ilWSBB7sNovGBqcQpKtg" alt=""><figcaption><p><strong>Time aggregation and dependents - not applicable for Constant node</strong></p></figcaption></figure>

{% hint style="info" %}
The new node created through the above ways will copy all the properties except the Type and Configuration of the node to which it was added.&#x20;
{% endhint %}

## 2. Group Node

A group node is a node that is used as a title or header inside the model and it doesn't hold any value. They are used to provide context and improve the design of the model. Group nodes can be used to group multiple nodes under a common label/ title.

To add a Group node, click the 3 dots beside the node name and select **Add Group**.

<figure><img src="/files/csBOG3tNsPTpWoAgD3Ad" alt=""><figcaption><p><strong>Add Group</strong></p></figcaption></figure>

A Group node is created and named as *New Group(1)* by defaul&#x74;*.* You can rename the group node name accordingly.

You can now add new child nodes under this group node as explained [here](#1.-add-node) or [move ](#5.-move-node)the existing nodes within this group.&#x20;

In the below image, you can see that the group node is renamed to *Income Statement* and the 'Net Income' node is moved within that group.

<figure><img src="/files/aSxwIDQw4dF5Nu646mPM" alt="" width="563"><figcaption><p><strong>Group Node -</strong> <strong>Example</strong></p></figcaption></figure>

In the Simulate tab, it is shown with the group node icon as below.

<figure><img src="/files/twSDdOwkK2kGQSir0ywa" alt=""><figcaption><p><strong>Group Nodes</strong></p></figcaption></figure>

## 3. Duplicate Node

Hover over the node that you want to duplicate and select **Duplicate** from the options under the 3 dots. This will duplicate all the properties of the selected node including the Type and configuration of the node.

<figure><img src="/files/Fhix4H7xYXa65vYQnkWL" alt="" width="563"><figcaption><p><strong>Duplicate Node</strong></p></figcaption></figure>

## 4. Rename Node

To rename, double-click on the node you want to rename and enter the new name.

<figure><img src="/files/ddTODvc1LgO6hPmdhsHx" alt="" width="563"><figcaption><p><strong>Rename Node</strong></p></figcaption></figure>

## 5. Move Node

To relocate a node to a different place in the model, hover over the node you want to move and choose **Move** **To** from the 3 dots menu.

<figure><img src="/files/Lzv0o8LIbqwBsHQjnJPV" alt="" width="563"><figcaption><p><strong>Move Node</strong></p></figcaption></figure>

From the pop-up, choose the node under which you want to move the node and click **OK**.

<figure><img src="/files/YSeZhN6n4lCQawnJCZn3" alt="" width="375"><figcaption><p><strong>Select a node to move to</strong></p></figcaption></figure>

The node is now moved to the selected node as its first child.

## 6. Edit Node

Editing a node consists of updating any of the node's settings. To edit a node, click the pencil icon next to the node name or select the node and click **Edit Node** on the toolbar. Each of the node properties is explained in detail in the section [Node Settings.](/model/node-settings)

<figure><img src="/files/RmaK4HKQrxFJ0nicL8Wx" alt=""><figcaption><p><strong>Edit Node</strong></p></figcaption></figure>

## 7. Re-order Node

The position of the nodes can be re-ordered through the drag-and-drop feature. The re-order icon  <img src="/files/KHt6pZeENpu07vRQ0BDa" alt="" data-size="line"> before the node name can be used to re-order the child nodes within a parent or move them to another parent.

Hover over the node and click on the icon. Now drag it to the desired position and drop it.

<figure><img src="/files/efmrNTmMipi9wuJCjGxS" alt="" width="563"><figcaption><p><strong>Re-order Node</strong></p></figcaption></figure>

{% hint style="info" %}
When you drag & drop a parent node, all the descendants of it will also be moved to the new location.
{% endhint %}

## 8. Bulk Editor

Bulk Select is a model editing tool that enables us to perform an action on multiple nodes in one go. The actions that can be performed under Bulk Select are editing node settings, and moving and deleting nodes.&#x20;

To select the nodes that need to be edited, click **Bulk Select** on the toolbar and then select all the nodes that need to be edited.

<figure><img src="/files/X4AI451ymCOGbMZw8fgY" alt=""><figcaption><p><strong>Bulk Select</strong></p></figcaption></figure>

Another way to select nodes would be from the dropdown on the checkbox in the header. The dropdown has options such as All Nodes, Leaf Nodes and Filtered Nodes.

<figure><img src="/files/uB2xDtvv32I8GzsszaWY" alt=""><figcaption><p><strong>Bulk Select dropdown option</strong></p></figcaption></figure>

**Edit node settings:** Select the **Bulk Editor** button from the black color menu at the bottom of the screen.

<figure><img src="/files/C8aCjjN7n8y9mQTRCHyR" alt=""><figcaption><p><strong>Select Bulk Editor</strong></p></figcaption></figure>

This will open the list of properties that can be updated. Make the necessary changes in the popup and click **Apply** to update all the selected nodes.

<figure><img src="/files/Pe1Qka9jrhiZ5QWhW2rb" alt=""><figcaption><p><strong>Bulk Editor</strong></p></figcaption></figure>

**Move nodes:** Select the **Move To** button from the black color menu at the bottom of the screen.&#x20;

<figure><img src="/files/nbUds6T4Y0yhG4iefhjs" alt=""><figcaption><p><strong>Move Nodes</strong></p></figcaption></figure>

This will open the node selection popup where you can select the node under which you want to move the selected nodes and click **OK**.

<figure><img src="/files/YSeZhN6n4lCQawnJCZn3" alt="" width="375"><figcaption><p><strong>Select a node to move all the nodes</strong></p></figcaption></figure>

**Delete nodes:** Select the **Delete** button from the black color menu at the bottom of the screen to delete all the selected nodes.

<figure><img src="/files/nEjFWz32Wosag4XrtyP6" alt=""><figcaption><p><strong>Delete nodes at once</strong></p></figcaption></figure>

## 9. Delete Node

Click the Bin icon <img src="/files/zHcti5oiK20Y89PXydUH" alt="" data-size="line">  next to the node name to delete a node and its dependents.

<figure><img src="/files/j02XtBadO5IgoIR6kEr7" alt="" width="563"><figcaption><p><strong>Delete Node</strong></p></figcaption></figure>


# Editor Features

The model tab has some essential features on the toolbar that help in the model-building activity. They are detailed in this section.

### 1. Expand or Collapse

The arrow icons <img src="/files/2R6X9dG4c15J0tPqQHHM" alt="" data-size="line"> <img src="/files/bgI9VfMrAiiVxZrBBv6Y" alt="" data-size="line"> available at the left of each node name can be used to expand/collapse the parent nodes.

To expand/collapse all levels, click on the burger icon <img src="/files/TmSUtRIZKFitMTkLrEaK" alt="" data-size="line"> to the left of the **Node Name** column header. This can be used to show/hide the node hierarchy of the model. **Expand All** option expands the entire node structure till the last level of the model while the **Collapse All** option displays only the nodes at the first level.

<figure><img src="/files/6aB189BVxggYBLuy4ubf" alt="" width="375"><figcaption><p><strong>Expand or Collapse Levels</strong></p></figcaption></figure>

### 2. Manage Columns

**Manage Columns** option allows you to decide which columns to be displayed on the grid. There are 9 columns displayed by default, which are Type, Configuration, Time Aggregation, Desired Trend, Scale, Decimals, Prefix, Suffix and Simulation Method.

To modify the grid view, select the **Manage Columns** button on the toolbar. In the pop-up window, you can select and deselect the columns as required.

<figure><img src="/files/HXnArS5tculNxtRyla1q" alt=""><figcaption><p><strong>Manage Columns</strong></p></figcaption></figure>

### 3. Search

Search for any node on the model by clicking the **Search** icon <img src="/files/cI10i2PpNlFrZbUfqHCZ" alt="" data-size="line">. After clicking, enter the text using which you want to search the nodes. The search result nodes are highlighted and the results dropdown displays the number of results along with the arrows with which you can navigate to the highlighted nodes.

<figure><img src="/files/nJuXAlZ1w7gXdOnsT909" alt=""><figcaption><p><strong>Search</strong></p></figcaption></figure>

### 4. Filter

The **Filter** icon <img src="/files/Q8iQEzEc4kQeiMbYuAsz" alt="" data-size="line">can be used to perform a condition-based search on the model. Multiple filter criteria can be provided by the user to perform advanced searches across different node properties. To add multiple criteria, click the **Add Filter** option and choose between AND or OR conditions.

<figure><img src="/files/OaY6tdCW5M9N8htE4lg7" alt=""><figcaption><p><strong>Filter</strong></p></figcaption></figure>

**Disable All** can be used to toggle between the states of filter and no filter. **Clear All** will delete all the applied filters.

### 5. Undo and Redo

Undo or redo the recent changes you have made to the model by clicking <img src="/files/wERNbIFHgcIdQfJ1kuPn" alt="" data-size="line"> and <img src="/files/DgJqfFA1K3Z7m6WLpVU2" alt="" data-size="line"> respectively. Undo is enabled after you start making changes to the model. Redo is enabled after the first undo.

### 6. Notes

Click **Notes** to add any notes or view saved notes about the model.

<figure><img src="/files/jULNmMgWG9T1mnE5AEBn" alt=""><figcaption><p><strong>Add Notes</strong></p></figcaption></figure>

In the notes window, select the **Edit** button to type your notes and click **Save**.

<figure><img src="/files/mQ6ho3TM8OPqcRdFuqZL" alt=""><figcaption><p><strong>Click Edit to add notes</strong></p></figcaption></figure>

### 7. Settings

The settings menu contains the global-level options that are used to configure the visual as required. These options are explained in detail in the [Settings](/model/global-settings) section.

<figure><img src="/files/aOXymY2hWFcW30DCCcez" alt=""><figcaption><p><strong>Click 'Settings'</strong></p></figcaption></figure>

### 8. Keyboard Shortcuts

Grid interactions can also be performed using keyboard shortcuts which are listed under the help icon. Click <img src="/files/pLxByuzEzAOBw8G2FCQn" alt="" data-size="line"> and the keyboard shortcuts window opens as shown below.

<figure><img src="/files/uQdcFiTWvhaoVbKuhlm6" alt="" width="375"><figcaption><p><strong>Keyboard Shortcuts</strong></p></figcaption></figure>

### 9. Bottom Panel

The bottom panel of the model tab provides necessary information about the model such as node count, preview of the node value, errors on the model, analysis of the model, formula editor and the model name.

Click this icon <img src="/files/Gh6tuDlZcWim3MBmQhnD" alt="" data-size="line"> to expand or collapse the bottom panel.

<figure><img src="/files/q1tW2jCCBumzqM9Acpbe" alt=""><figcaption><p><strong>Bottom Panel</strong></p></figcaption></figure>

The first one is the **Preview** section which displays the total and period values of the node selected by the user.

<figure><img src="/files/STDbdO9hDVdsKbq8lprp" alt=""><figcaption><p><strong>Preview Section</strong></p></figcaption></figure>

The second one is the **Errors** section which shows the count of errors in the model if any. Selecting this icon will list all the error nodes along with the error description. The errors are highlighted on the grid and you can navigate to the error node by clicking on the node name from the error section.

In the below image, you can see the errors and their description at the bottom of the screen in the **Errors** section. The total number of errors is also displayed at the top.

<figure><img src="/files/OLgxX13JZ9RRl3IninRr" alt=""><figcaption><p><strong>Errors section</strong></p></figcaption></figure>

The **Analysis** window assesses the model's complexity by analyzing its configuration - type, configuration, dependencies, etc. and shows the complexity index for all the nodes.

<figure><img src="/files/3xsMVdmOwfPLeHwDQQsy" alt=""><figcaption><p><strong>Analysis section</strong></p></figcaption></figure>

**Formula Editor** window allows the user to view, enter, or edit the formula contained in the formula type nodes. When you make any changes to the formula, the **Apply** button gets enabled which can be clicked to apply the new formula.

<figure><img src="/files/lRyltPla1ySyT799xrhk" alt=""><figcaption><p><strong>Formula Editor</strong></p></figcaption></figure>

At the bottom left of the panel, you can find the **Total** node count with hidden node count (if any) under the info icon.&#x20;

In case a filter is applied on the grid, the filtered node count is displayed along with the total node count and hidden node count under the info icon.

<figure><img src="/files/oJRPluj2fcBHXLmOrK6F" alt=""><figcaption><p><strong>Filtered, total and hidden node count</strong></p></figcaption></figure>

The last item on the right side of the status bar is the **Model name with the logo**. Both the model name and the logo can be updated in the [Settings](https://docs.valq.com/model/model-editor/pages/9dRQlKNML0z3zNWEfNgv#1.1.-about-model). Alternatively, the model name can be renamed by double-clicking on it.&#x20;

<figure><img src="/files/QQjpOoiwbswGyL1g3Qww" alt=""><figcaption></figcaption></figure>


# Node Settings

In this section, we will learn about each of the node properties in detail.

{% hint style="info" %}
The node properties can be configured in the grid view as well as in the node settings panel.&#x20;
{% endhint %}

In the grid view, click on the pencil icon next to the node name or click the **Edit Node** option from the toolbar to open the **Node Settings** window.&#x20;

<figure><img src="/files/RmaK4HKQrxFJ0nicL8Wx" alt=""><figcaption><p><strong>Edit Node</strong></p></figcaption></figure>

This window has 4 tabs as listed below.

1. [General](#1.-general)
2. [Format](#2.-format)
3. [Simulate](#3.-simulate)
4. [Display](#4.-display)

## 1. General

The General tab consists of some essential node properties such as Node Name, Type, Configuration, Time Aggregation, Desired Trend and Description.&#x20;

<figure><img src="/files/8ISsBjQxwkwRJmi3C7BX" alt="" width="319"><figcaption><p><strong>General tab</strong></p></figcaption></figure>

### **1.1. Node name**

Here, you can edit the name of the node.

### **1.2. Type**

The Type property is used to assign the nature of the node which helps in setting up the configuration. There are four node types to choose from.

<table><thead><tr><th width="212">Node type</th><th>Description</th></tr></thead><tbody><tr><td>Formula</td><td>ValQ computes and executes the user-defined formula on the node.</td></tr><tr><td>Data Source</td><td>The node gets the values directly from the source data.</td></tr><tr><td>Linked to Node</td><td>The node value, its properties and simulation are linked to another node.</td></tr><tr><td>Manual Input</td><td>The user can enter the values manually for this type of node.</td></tr></tbody></table>

### **1.3. Configuration**

Based on the Type selection, the configuration can be filled in as required by the user.

#### Formula

If the node is of formula type, the configuration can be filled in as a formula. You can manually type the formula or choose the required formula from the suggestions pop-up that appears as you start typing.&#x20;

<figure><img src="/files/v77S0kxNRBQwDAUNv4b9" alt=""><figcaption><p><strong>Formula</strong> </p></figcaption></figure>

**Note:** Use Ctrl+Space to open all suggestions.&#x20;

For more help on the usage of different formulas and functions, you can refer to [this section](/model/formula-functions).

#### Data Source

In this case, the node fetches the values from the source data based on the source key selected by the user.

<figure><img src="/files/KLEGmHYf5g8Eo2xcd9KV" alt=""><figcaption><p><strong>Data Source</strong></p></figcaption></figure>

#### **Dynamic Children From Data Source**

This setting is used to instantly add all the descendant nodes from data, for Data Source nodes based on the selected source key. The nodes are identified from the Category Fields that are assigned to the visual.

<figure><img src="/files/J7urzobsFkGjy0CoaP9V" alt=""><figcaption><p><strong>Add dynamic children from data source</strong></p></figcaption></figure>

#### Linked Node

If the node type is ‘linked node’, then a node selection pop-up appears where you can choose a specific node to connect to.

<figure><img src="/files/Brrr2xMP68Aq6D8wD9Zr" alt=""><figcaption><p><strong>Linked Node</strong></p></figcaption></figure>

{% hint style="info" %}
Nodes that are linked share the same node value, properties, configuration, and simulation so that they mirror each other. Nodes are linked when the same node is required in many instances in the model.
{% endhint %}

#### **Manual Input**

For manual input-type nodes, users are allowed to fill in the node values manually.

<figure><img src="/files/9Y2sSOlhEvt1UiXWxSfd" alt=""><figcaption><p><strong>Manual Input</strong></p></figcaption></figure>

#### **Hybrid Configuration**

In cases where you want to specify different node configurations for the open and the closed periods, you can enable hybrid configuration of nodes.

Open period values refer to the plan/forecast series and the closed period values refer to the actuals. Using this option, you can configure different formulas, data sources, or manual values for the actuals and the plan/forecast.

{% hint style="info" %}
Hybrid configuration can be done only in editable models. For dynamic models, convert it to an editable one before configuring it for the open period.

For a model that contains templates, use the **Templates** window to include open-period configuration for the **template nodes**. Templates are covered in detail in the [next section](/model/templates).
{% endhint %}

To enable open period node configuration, toggle the button below in the [Model Settings](/model/global-settings#model-settings) window.

<figure><img src="/files/EjDmVwahxnrtjzFl201H" alt="" width="563"><figcaption><p><strong>Enable Open Period Formula</strong></p></figcaption></figure>

The model looks as shown with an option to configure the nodes for the open period.

<figure><img src="/files/fOlmSHruIasPr0UH3InM" alt=""><figcaption><p><strong>Hybrid period configuration</strong></p></figcaption></figure>

Convert the model to an editable model to start open period configuration.

<figure><img src="/files/R6AGUxkKPsc360jkwnwG" alt=""><figcaption><p><strong>Convert Dynamic to Editable</strong></p></figcaption></figure>

The image below shows an example where the *Expense* node has two different configurations for the closed and open periods - formula type and manual input type respectively.

<figure><img src="/files/GBST33iDCF8y7iy4JXxR" alt=""><figcaption><p><strong>Hybrid period switch</strong></p></figcaption></figure>

The node settings window also appears as shown below where you can configure the node for both open and closed periods.

<figure><img src="/files/c2CGMEDPUcVq1EIFht0j" alt=""><figcaption><p><strong>Node Settings window</strong></p></figcaption></figure>

The following example illustrates how the hybrid node configurations defined in the model are applied to the plan for the *Expense* node.

<figure><img src="/files/VeeVZlyMiDbuqFuF0Fcr" alt=""><figcaption><p><strong>Hybrid Configuration in Plan</strong></p></figcaption></figure>

### **1.4. Time Aggregation**

This property determines how the total node value needs to be calculated from its period values. The following are the different time aggregations available to the user.

<table><thead><tr><th width="248">Time Aggregation</th><th>Description</th></tr></thead><tbody><tr><td>Sum</td><td>Adds all the period values</td></tr><tr><td>Average </td><td>Calculates the average of the period values</td></tr><tr><td>Average Excluding Zeros  </td><td>Calculates the average of the non-zero period values</td></tr><tr><td>Formula </td><td>Calculates and applies the custom formula entered by the user</td></tr><tr><td>Last</td><td>Only displays the last period value of the node</td></tr><tr><td>Running Total</td><td>Cumulative total of the period values of the node</td></tr><tr><td>Weighted Average</td><td>Calculates the weighted average of the period values based on the nodes from which the weights are taken.</td></tr></tbody></table>

### **1.5. Desired Trend**

The trend of the node can be set to *Increase* or *Decrease* depending on the context of the node. For instance, the Desired Trend for the Revenue node is Increase whereas for the Expense node, it is Decrease.

### **1.6. Description**

Any text describing the node or technical notes can be entered in the Description box.

<figure><img src="/files/Hj84gJUkKJYSPlq3UCw0" alt=""><figcaption><p><strong>Add Description</strong></p></figcaption></figure>

The node description is also displayed in the respective node details screen on the Simulate tab.

<figure><img src="/files/5PrjT9TtreHJpduM8uNS" alt=""><figcaption><p><strong>Node Description in Node Scenario Analysis screen</strong></p></figcaption></figure>

## 2. Format

The Format tab contains properties to edit the number formatting and conditional formatting of a node.

<figure><img src="/files/AckavUzqnipThMcdHjyM" alt="" width="324"><figcaption><p><strong>Format tab</strong></p></figcaption></figure>

### 2.1. Number Formatting

Under Number Formatting you can configure the scale, number of decimal places to display, prefix and suffix.

{% hint style="info" %}
The *User Selected* option under **Scale** means that the scaling of the node is dynamic and gets changed when the user changes it on the Scaling Setting in the toolbar from any of the tabs.
{% endhint %}

### **2.2. Conditional Formatting**&#x20;

Conditional Formatting can be used to configure the rules for the color formatting applied to the nodes on the Simulate tab. It can be applied based on the variance or the node value.

<figure><img src="/files/H1fvzUF5gipz2nsdjDg7" alt=""><figcaption><p><strong>Conditional Formatting on nodes in Tree view</strong></p></figcaption></figure>

<figure><img src="/files/kbbtnt3RDlGLbk1iX2n3" alt=""><figcaption><p><strong>Conditional Formatting on nodes in Table view</strong></p></figcaption></figure>

## 3. Simulate

In the Simulate tab, you can configure simulation settings such as the Simulation Method and setting the slider's direction.

<figure><img src="/files/wU8NuW5fjPB1kN9K6HXX" alt="" width="322"><figcaption><p><strong>Simulate tab settings</strong></p></figcaption></figure>

### **3.1. Simulation Method**

There are five methods by which simulation can be performed.&#x20;

1. Change % - Percentage change applied to the baseline value.
2. Growth % - Percentage growth applied to the baseline value.
3. Constant - Constant value applied for all the simulation periods.
4. None - Disable simulation for the node.
5. Linked Simulation - Links the node's simulation to the selected node simulation (mirrors the simulation on it).

{% hint style="info" %}
The simulation is always applied to the period values and the total node value is calculated depending on the node's **Time Aggregation** set by the user.
{% endhint %}

Here are the examples showing the node values before and after simulation under each method:

<figure><img src="/files/Pb7mry9wBVMn2AN2nrHH" alt=""><figcaption><p><strong>Simulation Method</strong></p></figcaption></figure>

**Slide Right to:** To increase the node value on sliding right, set the Slide Right to property as *Positive Simulation* and to decrease the value set it as *Negative Simulation*.

**Note:** Simulation for dynamic children can be enabled or disabled at the top node in a dynamic model.&#x20;

<figure><img src="/files/EVoOQkDaml3WFnbIuTV3" alt="" width="364"><figcaption><p><strong>Simulation for dynamic children</strong></p></figcaption></figure>

When the simulation is disabled, all data source nodes beneath the top node can not be simulated, as indicated by the simulation-disabled icon on the nodes.

<figure><img src="/files/nusqltmtrq8c58NChkLP" alt=""><figcaption><p><strong>Simulation disabled for dynamic children</strong></p></figcaption></figure>

You can toggle the same option to enable simulation - for all dynamic nodes or only the leaf nodes. The desired simulation method can also be selected for these nodes.

<figure><img src="/files/X0Z65hgafxm7prtelKa3" alt="" width="326"><figcaption><p><strong>Simulation for dynamic children</strong></p></figcaption></figure>

## 4. Display

The Display tab is used to configure node settings such as node display, show as KPI or Key Input, setting up constraints, adding composite nodes and customizing secondary KPI.

<figure><img src="/files/FGzpzUTF6b8eEP07O62E" alt="" width="323"><figcaption><p><strong>Display tab</strong></p></figcaption></figure>

{% hint style="info" %}
The display settings configured here (except the Node Display option) apply to the Simulate tab, i.e. any changes made here would reflect on the Simulate tab.
{% endhint %}

### **4.1. Node Display**

This property determines whether the node should appear on the model and how it should appear. It changes the node's visibility across the other tabs, while the nodes are always available in the Model tab for configuration. The Node Display dropdown consists of the following three options:

1. Show - Displays the node as a normal node (Default).
2. Derived - Displays the node as being derived from its parent. It is denoted by a dotted line and transparent node tile in the Simulate tab - tree view.
3. Hidden - The node is hidden from the visual based on the tabs chosen, but it is available for calculation and other references in the Model tab. If a parent node is hidden all the descendants under it also get hidden.

### 4.1.1. Hide in Tabs

This dropdown menu appears when you choose the **Hidden** option in the Node Display to hide a node. You can select the tabs where you want the node to be hidden.

<figure><img src="/files/OWmvAzcWzQIooQy4oanR" alt=""><figcaption><p>Node Display - Hide in Tabs</p></figcaption></figure>

{% hint style="info" %}
Node Display of the root node can never be set as *Derived* or *Hidden*.
{% endhint %}

### **4.2. Show as Key Input and Show as KPI**

To add/show the node as a key input in the Key Inputs section or as a KPI in the KPI ribbon on the Simulate tab, enable any of these toggle buttons.

<figure><img src="/files/xTbg9ltGSlP8JIjRMWUB" alt="" width="269"><figcaption><p><strong>Add and Show as Key Input or as KPI</strong></p></figcaption></figure>

### **4.3. Constraint**

Constraint can be added to a node by way of assigning minimum and maximum threshold values a node can have, against which you can evaluate the model's performance.&#x20;

To set a constraint for a node, go to the Constraint section in the Display tab. Then enter the minimum and maximum values permissible for that node.

In the below example, the constraint for *Cost of Sales* is set with the minimum and maximum values as 2700 and 4000 respectively.&#x20;

<figure><img src="/files/obxJ4KO95b9s1Eq0CJ7O" alt=""><figcaption></figcaption></figure>

The values entered are for each period and hence the minimum and maximum limits for that node are computed as the product of the value entered and the number of periods. As there are 12 periods available here, 12 \* 2700 and 12 \* 4000 are the limits. Therefore, the minimum and maximum threshold values would be 32400 and 48000 respectively.

If the cost of sales exceeds $48000 or falls below $32400 in any scenario during simulation, a warning is displayed to the user about the constraint along with the difference in value by which the simulated result exceeds or falls below the threshold levels.

<figure><img src="/files/4AyVTrnh7Dx8EdjSZcOJ" alt=""><figcaption><p><strong>Warning pop-up about the Constraint</strong> </p></figcaption></figure>

Click on the warning symbol to view all the constraints violated in the model.

<figure><img src="/files/DTgRqfqZkDjPrDDd5Vb1" alt=""><figcaption><p><strong>Constraints violated</strong></p></figcaption></figure>

### **4.4. Composite nodes**

When there is a large number of nodes in the model, and you want to take a quick look at another node that is important along with the current node you can use the Composite Nodes option. This option helps you to include up to two nodes within the node's tile that are important or relevant to it.

To add a composite node, click **Select a node**, choose the node you want to add and click **OK.**

<figure><img src="/files/IMWqSpOA34pPA4CRByHm" alt=""><figcaption><p><strong>Add Composite Node</strong></p></figcaption></figure>

In the Simulate tab, it appears as shown below. *Revenue* node is added to *US* node so that you can have a quick look at Revenue and also simulate it.

<figure><img src="/files/NBjsjD63Xr5pFaynCWU2" alt=""><figcaption><p><strong>Composite Nodes</strong></p></figcaption></figure>

{% hint style="info" %}
The composite nodes option is for the visual arrangement of nodes and does not impact their relationship or the dependency of nodes.
{% endhint %}

### **4.5. Secondary KPI**

Secondary KPI helps you to insert additional values to the node tile. Under this property, you can input up to 2 customized secondary KPI values to the node tile.&#x20;

In the below example, Net Profit Margin is to be added as a secondary KPI to all *Net Profit* nodes. Since these are template nodes, go to **Templates** Sections and click on the **Edit Node** option for the *Net Profit* node in the template available.

Go to **Secondary KPI** in the **Display** section and click on the pencil icon. Enter the formula/function you want as the Secondary KPI, enter a label for it and click **OK**.

<figure><img src="/files/GElTdRZZzUCwVSWOcVlf" alt=""><figcaption><p><strong>Adding Secondary KPI</strong></p></figcaption></figure>

<figure><img src="/files/u7YjB9KYWqTRiscSuHNX" alt=""><figcaption><p><strong>Secondary KPIs</strong></p></figcaption></figure>


# Templates

Template refers to a common layout of nodes that can be used to create a model that has a repetitive pattern of node structure. The template is created once as per the user's needs and can be reproduced any number of times within the model to build it.&#x20;

The below example shows how a template named **Net Profit** is created once and has been reused for different product categories.&#x20;

<figure><img src="/files/H07jivF09b5HyuOeL0Xx" alt="" width="563"><figcaption><p><strong>Model - Before and After Template</strong></p></figcaption></figure>

Click the **Templates** menu in the toolbar to enter the template section. There are two options available to you:

1\. [Create your own template](#create-new-template)

2\. [Import an existing template](/model/templates/import-template)

<figure><img src="/files/bOQIVvFBK754uNY0PRtC" alt="" width="375"><figcaption><p><strong>Create or Import a Template</strong></p></figcaption></figure>

Let us first see how to create a new template.

## Create New Template

After clicking the **Create New Template** option from the pop-up, the editor screen is displayed to start building your template. An editor screen just like the model tab editor is available to you to create your template structure.

Creating a template is similar to creating a new model, more precisely, a subset of the model where all the modeling features can be used such as [adding new nodes](https://docs.valq.com/model/pages/FS2Kz9WTA6yhUl2VCcA9#id-1.-add-node), [editing the nodes](https://docs.valq.com/model/pages/FS2Kz9WTA6yhUl2VCcA9#id-6.-edit-node), [moving](https://docs.valq.com/model/pages/FS2Kz9WTA6yhUl2VCcA9#id-5.-move-node) and [re-ordering](https://docs.valq.com/model/pages/FS2Kz9WTA6yhUl2VCcA9#id-7.-re-order-node), [hybrid formula configuration](/model/node-settings#hybrid-configuration), etc.

Find below the image of a template being created just like building a model. You can refer to [this ](/model/model-editor/node-operations)section for more help on using the modeling features.

<figure><img src="/files/LtqBRlluE1bYW2LQ6gyp" alt=""><figcaption><p><strong>Template being created in Template Editor</strong></p></figcaption></figure>

Click on the vertical ellipsis next to the template name at the bottom to duplicate or delete it.

<figure><img src="/files/v0QWz827Don2w0pSTKox" alt=""><figcaption><p><strong>Duplicate/Delete template</strong></p></figcaption></figure>

Click on the + icon as shown below to create and/or import further templates.

<figure><img src="/files/iuTj3GftwlRt20hGLsMu" alt=""><figcaption><p><strong>Create/Import Template</strong></p></figcaption></figure>

{% hint style="info" %}
Nodes in the template can be of any type - manual input/data source/formula type.
{% endhint %}

## Template Keys

A unique feature in the template editor is a special type of node called a **Template key node.** Template keys are a list of keywords taken from the leaf nodes that are used in creating Data Source nodes in the model.&#x20;

<figure><img src="/files/McveVAnhQ7x9eiX5cHs3" alt=""><figcaption></figcaption></figure>

While creating the template structure, you can choose the required template keys for the driver nodes that need to get values from the data source. For example, if you want the 'selling price' and the 'units sold' as the driver nodes to be picked from the data source, you can choose them as template keys from the leaf level (*GL Account* Category).

<figure><img src="/files/lelQpJJyV0nj66MOE6Th" alt="" width="375"><figcaption><p><strong>Choosing template keys from leaf nodes</strong></p></figcaption></figure>

Upon creating and applying the template to the model, the template key is paired with the source key to identify its lineage, and the template key nodes are displayed as Data Source type nodes in the model.

<figure><img src="/files/UGtrUS9vMP8VFIjLsucK" alt="" width="563"><figcaption><p><strong>template keys pairs with the source key at each 'Product' level</strong></p></figcaption></figure>

<figure><img src="/files/BMVa2pLbZsUGxksivO3m" alt=""><figcaption><p><strong>Template keys as Data Source Nodes in the model</strong></p></figcaption></figure>

## How do Template Keys work?

**Step 1:** Add template keys in the template.

You can choose any one of the three ways listed below to add template key(s).

<figure><img src="/files/0Qeyas4XpccZLCFKDq29" alt=""><figcaption><p><strong>Add Template Key Node</strong></p></figcaption></figure>

1. Click on the <img src="/files/nmrVC2U6oZoYIcQPwkqw" alt="" data-size="line"> icon beside the node name under which you want to add the template keys as child nodes.&#x20;
2. Select the node and click **Add Template Key Node** on the toolbar.
3. Create a node and choose its type as *Template* *Key* in the **Type** dropdown.

**Step 2:** Configure Template keys.

ValQ allows you to configure the template keys by letting you choose the last level nodes (leaf nodes) of the model from the data source. These leaf nodes are automatically presented in the pop-up as shown.

{% hint style="info" %}
If you have not assigned any data to the visual, you will be prompted to do so in the **Add Template Key Nodes** pop-up as '*Add Category and Values fields to the visual'*.
{% endhint %}

Select the relevant leaf nodes from the list.&#x20;

<figure><img src="/files/crn1Kz69iKcPIaWIkm6o" alt=""><figcaption><p><strong>Configuring template keys</strong></p></figcaption></figure>

**Step 3:** Select whether you want it to be a child node or a sibling node and then click **Add** to apply. Template keys are now configured and the template is ready.

Find below the *Net Profit* template that has been created using the above steps.

<figure><img src="/files/21LKslcVTY2K1pOKphFI" alt=""><figcaption><p><strong>'Net Profit' template</strong></p></figcaption></figure>

{% hint style="info" %}
The leaf nodes belong to the last category assigned to the visual for models having uniform structure. In the case of a ragged hierarchy, the template keys are leaf nodes belonging to different levels.
{% endhint %}

**Step 4:** Apply template.

Now, while applying the template, these template keys fetch the relevant leaf node data for some or all of the categories based on the source key(lineage of the node it replaces).

In the below image, template keys such as *Selling Price, Units Sold, Other Income*, etc. fetch the relevant leaf nodes from the product categories - Men, Women, and Orange. On applying the template, the *Selling Price, Units Sold,* and *Other Income* nodes become the respective Data Source nodes of the model.

<figure><img src="/files/BMVa2pLbZsUGxksivO3m" alt=""><figcaption><p><strong>Template keys as Data Source Nodes in the model</strong></p></figcaption></figure>

## FAQs on templates

#### **1. Data source nodes also fetch data from the data source. What is the difference between template keys and data source nodes?**

The template key only contains the leaf part of the source key (the last level in the lineage) while Data Source node is created with the complete source key (the entire lineage).

<figure><img src="/files/M6ZJDwQ8JZbc9BkuVsI0" alt=""><figcaption><p><strong>Template Keys</strong></p></figcaption></figure>

<figure><img src="/files/jrdw9iGXIOEHunjCxw8G" alt=""><figcaption><p><strong>Data Source Nodes</strong></p></figcaption></figure>

Hence DataSource nodes refer to static nodes (E.g. *US/Clothing/Men/Units Sold*), while template keys (E.g. *Units Sold*) can refer to and fetch any leaf node depending on the lineage **dynamically**.

As the template key is only a part of the source key it can be used to create many nodes across the model that fetches its respective values based on the lineage. This dynamic nature of the template key helps in scaling the model whenever new data is added.

#### **2. Are template keys mandatory to create templates?**

Templates can be created without template keys too. For example, in use cases where you would want to insert or replace nodes with a repetitive set of numerical/calculation nodes at different levels, you can create nodes that are of manual input type/data source type/formula type.

In the below example, a template has been created with only the formula nodes to calculate variance.

<figure><img src="/files/oaSFSPzWldxj0U7KHuZX" alt=""><figcaption><p><strong>Template to calculate variance</strong></p></figcaption></figure>

#### 3. How does template help in scaling the model?

By creating a dynamic model, whenever the data set is updated with new data such as a new product or division, the new data is automatically added as nodes to the model, and template structure is applied to these nodes.

#### **4.** Can the template structure be modified after applying it to the model?

Yes, to modify a template structure go to the **Templates** section, and select the respective template tab to edit the nodes.

-> To know how to apply the created templates, go to the [next section](/model/templates/apply-template).

-> To understand other template actions like - modifying the template application rules or copying the rule to other dynamic nodes, or removing the template from the model, refer to [this section](/model/templates/manage-template-nodes).

-> Import and Exporting templates are explained in the further sections.


# Apply Template

Let's understand how to apply the created template in dynamic and custom models with the help of examples.

## Dynamic model

When a [dynamic model](/glossary) or [dynamic children](/glossary) are created, all the nodes (except the top node) are disabled from editing and they simply just add up over each level.&#x20;

Now, with the help of a template, you can **modify** the existing node structure while retaining its dynamic nature. There are two ways by which you can modify the model with templates:

* By replacing the existing node structure (or)&#x20;
* By inserting new nodes within the structure

To do this, click the **Apply Template** button from the **Templates** window.

<figure><img src="/files/ggy0FCKlmKUctbd3QQ1R" alt=""><figcaption><p><strong>Apply Template</strong></p></figcaption></figure>

It has two options - [**Replace Nodes with Template**](#1.-replace-dynamic-nodes-with-template) and [**Insert New Nodes with Template**](#2.-insert-custom-nodes-into-the-model).

### **1. Replace Dynamic Nodes with Template**

In this case, the template is applied to multiple nodes wherever required to replace their original structure with the template structure.

Let us see the steps to replace the dynamic nodes using template.

1. Create the template structure as needed.
2. Click **Apply Template-> Replace Nodes with Template** button.

<figure><img src="/files/aXTwPe3s1fKy8NteUilw" alt=""><figcaption><p><strong>Choose 'Replace Nodes with Template'</strong></p></figcaption></figure>

3. Datasource Node Editor opens in which you can configure the template rules.&#x20;

<figure><img src="/files/rjHxAzGzTRX8uKs8ou9C" alt="" width="563"><figcaption><p><strong>Datasource Node Editor</strong></p></figcaption></figure>

**a) Select Datasource Node:** Select the datasource node under which you want to apply the template.

**b) Select Level:** Select the level at which you want to replace the existing nodes with the template. In the below image, parent of the leaf nodes are chosen to be replaced with template.

<figure><img src="/files/JxSVxo7ByonUwXEauliL" alt="" width="563"><figcaption><p><strong>Select Level</strong></p></figcaption></figure>

{% hint style="info" %}
ValQ automatically detects which level is to be replaced by the template. Only the last two levels in the model (leaf nodes and parent of leaf nodes) are available for replacing nodes with template.

If leaf nodes are chosen as template keys, then select the level that is the parent of leaf nodes.
{% endhint %}

**Template Rules**

**c) Select Template:** This displays the current template. You can also choose any other template you had created, from the dropdown (if any) to apply that.

**d) Apply to:** In this section, choose **All Nodes** to apply the template to all the nodes at the selected level (or) you can choose **Filter** to apply the template to only a few specific nodes at the level based on certain filter conditions.

<figure><img src="/files/Uy0M8yiJdPMNwdUDAKVI" alt="" width="563"><figcaption><p><strong>Replace all nodes at the 'Product' level</strong></p></figcaption></figure>

**e)** **Append Template Root Node Name:** Checking the **Append Template Root Node Name** option appends the template name with the name of the root node.

E.g. '*Men'* node is renamed to *'Men - Net Profit'* if the 'Net Profit' template **replaces** the *Men* node structure.

4. Click **Preview** to view the changes and then click **Save** to apply the template.

<figure><img src="/files/bpfagOSws1u8M0JvCBVe" alt="" width="563"><figcaption><p><strong>Preview of the template to be applied</strong></p></figcaption></figure>

### Example 1: Replace with a template structure &#x20;

In the below example which has a dynamic model, we'll see how net profit is calculated for the regions - Asia and US.&#x20;

**Step 1:** Find below the example of a dynamic model. Click **Templates**.

<figure><img src="/files/JCQAQ9uim8f5sacWnm8g" alt=""><figcaption><p><strong>Dynamic Model - Example</strong></p></figcaption></figure>

**Step 2:** The template is created first with the desired structure and configuration along with the template key nodes as shown below.&#x20;

<figure><img src="/files/T3iIiZhSMuBkn0TIKSWM" alt=""><figcaption><p><strong>Net Profit</strong> <strong>Template Created</strong></p></figcaption></figure>

**Step 3:** Click **Apply Template->Replace Nodes with Template.**

<figure><img src="/files/CsH8MeKCivTs4VgQysSt" alt=""><figcaption><p><strong>Replace Node with Template</strong></p></figcaption></figure>

**Step 4:** The level and the template are selected. Then the template is applied to replace **all the nodes** at the ***Region*** level. Click **Preview**.

<figure><img src="/files/j2Tl49Vvqq6dL2tVyjJI" alt="" width="563"><figcaption><p><strong>Replace at Region level</strong></p></figcaption></figure>

**Step 5:** After previewing, click **Save** to apply the template.

<figure><img src="/files/aZxM5DvuNtnuZ1UaqIYw" alt="" width="563"><figcaption><p><strong>Click 'Save'</strong></p></figcaption></figure>

Template is applied to the dynamic model as shown below. Nodes that belong to a particular template share the same color scheme.

<figure><img src="/files/XuxyC1jlIIcPqsPlRlhf" alt=""><figcaption><p><strong>After applying 'Net Profit' template</strong></p></figcaption></figure>

This way each region's profit is calculated and since the model is still dynamic any new region that gets introduced will automatically take the shape of the template structure as we have applied the template to all nodes at the *Region* level.   &#x20;

### Example 2: Replace with more than one template structure

In this example, two templates have been applied to the dynamic model at the *Company* level. The nodes *Company A* and *Company B* have been replaced with *Template (1)* and *Company C* and *Company D* with *Template (2)*.

This is achieved by using the **Add Rule** and then the **Filter** option in the **Apply to** section where two rules are added, one for each template.&#x20;

<figure><img src="/files/bI1rLukOSBxsn2ifvhCj" alt="" width="563"><figcaption><p><strong>Template(1) for Company A and Company B</strong></p></figcaption></figure>

<figure><img src="/files/I0i7TU8EqTG6fxFVLnRN" alt="" width="563"><figcaption><p><strong>Template(2) for Company C and Company D</strong></p></figcaption></figure>

Click **Preview** to verify and then click **Save**.

<figure><img src="/files/Cp4aBnW2HPkTOoQwaxph" alt="" width="375"><figcaption><p><strong>Preview</strong></p></figcaption></figure>

The templated nodes in the model are color-coded to identify the different templates that have been applied.&#x20;

<figure><img src="/files/IHAJ4EQuIrV0eTQQqwsW" alt=""><figcaption><p><strong>Two different templates Applied</strong></p></figcaption></figure>

### **2. Insert new nodes into the model**

The other way of applying a template is to **insert the template nodes as new nodes** at the selected levels in a dynamic structure. The new nodes can be added as children of **all** the parent nodes in a level or **only to a few** parent nodes in a level using the **Filter** option.

Let us see the steps to insert the template in the model as custom new nodes.

1. Create the template structure as needed.
2. Click **Apply Template->Insert New Nodes with Template** button.

<figure><img src="/files/AWKhCpa2R4iF87CKRxjs" alt=""><figcaption><p><strong>Choose 'Insert New Nodes with Template'</strong></p></figcaption></figure>

3. Datasource Node Editor opens in which you can configure the template rules.&#x20;

**a) Select Datasource Node:** Select the Data Source node under which you want to apply the template.

<figure><img src="/files/rzuC99s0ZrkhvWDCOgR7" alt="" width="563"><figcaption><p><strong>Insert template after the 'Region' level</strong></p></figcaption></figure>

**Template Rules**

**b) Select Template:** This displays the current template. You can also choose any other template you had created, from the dropdown (if any) to apply that.

**c) Parent Level:** Select the parent level under which you want to insert the template nodes as children.

{% hint style="info" %}
Unlike the Replace option, which only allows you to replace leaf nodes and parent of leaf nodes, inserting can happen at any category level.
{% endhint %}

**d) Apply to:** In this section, choose **All Nodes** to insert the template under all the parent nodes at the selected level or use **Filter** to insert under only specific parent nodes at the selected level based on filter conditions.

### Example 1: Insert new nodes for all parents under any level:           &#x20;

In the below example, we have created a template structure for *Net Profit with Discount%* and applied it using the **Insert with template** option for **All Nodes** under **Product** level.&#x20;

<figure><img src="/files/bba84xfCaHf2azqepGGg" alt="" width="563"><figcaption><p><strong>Insert Template after Product</strong></p></figcaption></figure>

This will add the template as additional nodes under every ***Product*** parent (every *Men* and *Women*).

<figure><img src="/files/LIFjMNf8zbeCKRZOSxJn" alt=""><figcaption><p><strong>Template Inserted after 'Product'</strong></p></figcaption></figure>

### **Example 2: Insert nodes under a 'selective' parent based on filter conditions**         &#x20;

In this example, *Template (1)* has been created with few formula nodes to calculate the variance.

<figure><img src="/files/oaSFSPzWldxj0U7KHuZX" alt=""><figcaption><p><strong>Template to calculate variance</strong></p></figcaption></figure>

This will be applied only for *Supplier A* in *India* region for *Apple* product. These specific categories are filtered using the **Filter** option in Template Rules as shown in the image below.

<figure><img src="/files/yTivKJYkbNtxfmReCYFn" alt="" width="563"><figcaption><p><strong>Apply to Selective parent using Filter</strong></p></figcaption></figure>

{% hint style="info" %}
**And** is the operator type used in the example to combine the filtering rules which means **all** the categories matching the entered text should be filtered.&#x20;
{% endhint %}

On applying this template to the model, the variance template structure gets added as a descendant of the filtered parent node (*Apple* node belonging to *Supplier A* of *India*).&#x20;

<figure><img src="/files/q90d56vkC9cPdafcnqVf" alt=""><figcaption><p><strong>template structure gets added as a descendant of the filtered parent node</strong></p></figcaption></figure>

{% hint style="info" %}
To apply the template, the Data source node editor can also be opened by clicking on the below icons.
{% endhint %}

<figure><img src="/files/hpIqAflQZkKXMYlEbrtJ" alt=""><figcaption><p><strong>Click to open Data source Node Editor</strong></p></figcaption></figure>

## Custom Model

### Add Template as New Nodes

In a custom model (editable model) we can add new nodes in the form of template nodes just like adding any other node in the model. Here **the template is added for a single node at a time**. Let us see the steps now.  &#x20;

1. Create the template structure as needed.
2. In the model, select the node where you want to add the template.
3. Click **Add New Node -> Add Node using Template.**

<figure><img src="/files/DrewmhAHSO99VWo7nx4t" alt=""><figcaption><p><strong>Add Node using Template</strong></p></figcaption></figure>

4. Choose the template you want to add and select the source key to fetch the values for template key nodes.

<figure><img src="/files/Q7GQN6F1OPlM3q5CgDXM" alt="" width="563"><figcaption><p><strong>Select Template Source Key</strong></p></figcaption></figure>

5. Clicking on **Select source key** opens a pop-up where you can select the source key for template.

<figure><img src="/files/DUXjQYBuaIw1z4rUhuOB" alt="" width="563"><figcaption><p><strong>Source key for Template</strong></p></figcaption></figure>

6. Choose the source key from the list and the position of the template to be added as a child or sibling of the selected node.

<figure><img src="/files/NRPvqzHBzqjRm2mv3D6v" alt="" width="563"><figcaption></figcaption></figure>

7. Click **Preview** to view the changes and then click **Apply** to apply the template.

<figure><img src="/files/HGW96FVZj1BmIOcezRK6" alt="" width="563"><figcaption><p><strong>Apply template</strong></p></figcaption></figure>

The nodes are added as template as shown in the below image.

<figure><img src="/files/mxC2ZLSHLW4RuxspgTaO" alt=""><figcaption><p><strong>Added nodes as template</strong></p></figcaption></figure>

{% hint style="info" %}
Note:

**Add node using template** is also available for dynamic model and dynamic children. However, using this option will add the template outside of dynamic node structure as a new branch to the model.
{% endhint %}


# Manage Template Nodes

After applying the template, the template nodes can be edited, copied, or deleted by clicking on the **Manage Template Nodes** icon <img src="/files/MRwCHkCtmjOOlYgF31Vv" alt="" data-size="line"> as shown below.&#x20;

<figure><img src="/files/nemMgvrVl3ZjJO51ozpL" alt=""><figcaption><p><strong>Click</strong> '<strong>Manage Templates' icon</strong></p></figcaption></figure>

The 'Manage Template Nodes' pop-up shows all the templated nodes used in the model, including their name, whether they have replaced the nodes or were added as new nodes, and a list of actions to select from.

The number on the icon indicates the total number of templates applied in the model. In the example below, there are two templates applied to the model - one to replace the nodes and one to add new nodes.

<figure><img src="/files/ytlklMXln7TXMDiLQ7lf" alt=""><figcaption><p><strong>Manage Template Nodes</strong></p></figcaption></figure>

#### Note:

Another way to open the datasource node editor and edit the templates is to use the shortcut icon near the node name.

<figure><img src="/files/MddPUNPxARlyaCtS0zyN" alt=""><figcaption><p><strong>Click To Open the DataSource Node Editor</strong></p></figcaption></figure>

The following actions are possible through the DataSource Node Editor window.

### Add/Edit/Delete Template Rules

1. Add a new template to the model by clicking **Add Rule** to configure that template into the model.&#x20;

<figure><img src="/files/onU6czSruyF42qMisV13" alt="" width="563"><figcaption><p><strong>Add a new template rule</strong></p></figcaption></figure>

2. Edit the applied templates.

* You can change the template using the 'Select Template' dropdown.
* To edit the level at which the template is applied, click on the 'Select Level' dropdown.
* Templates can be applied to all the nodes or specific nodes using the filter.&#x20;

<figure><img src="/files/KoC10W8VVlv9mcjHPREh" alt="" width="563"><figcaption><p><strong>Edit the applied template</strong></p></figcaption></figure>

3. Re-apply to different nodes using filter conditions.

* &#x20;Edit the Category and Member fields to change the filter conditions.

<figure><img src="/files/Fxqe5v0rbRgr78ced8JZ" alt="" width="563"><figcaption><p><strong>Changing filter conditions</strong></p></figcaption></figure>

* Add more than one filter condition and combine them using AND/OR operators.

<figure><img src="/files/LJAsReyVecPmhL1OtyvZ" alt="" width="563"><figcaption><p><strong>Add more than one condition</strong></p></figcaption></figure>

4. You can delete a specific template by clicking on **Delete** beside that template rule.

<figure><img src="/files/UReMgk2DS4U5AXldTpch" alt=""><figcaption><p><strong>Delete rule</strong></p></figcaption></figure>

{% hint style="info" %}
In case of multiple template rules applied to the model, if they overlap, the latest added rule overrides the previous rules.
{% endhint %}

### Remove Template from the model

To remove the template completely and revert the model to its initial state, click on the bin icon that appears next to the applied template.

<figure><img src="/files/TALEPMHbxUJYmg6d7t7c" alt="" width="563"><figcaption><p><strong>Remove Template</strong></p></figcaption></figure>

{% hint style="info" %}
This option removes **only the template references from the model** and does not delete the actual template that had been created.

The template would still be available in the **Templates** window.

Alternatively, to delete the actual template, it is mandatory to remove its references from the model first, by using [this option](#remove-template-from-the-model).&#x20;
{% endhint %}

### Copy Template Rules to Dynamic Children

In case of [dynamic children](/model/model-editor/node-operations#data) being added to the model (adding new nodes from data), you can apply the existing template rules to them.

Click on the **Copy rule** icon beside the template that you want to copy.

<figure><img src="/files/xjWBPI64mcmjx6fYiC6t" alt="" width="563"><figcaption><p><strong>Copy Rule</strong></p></figcaption></figure>

In the pop-up that opens, choose the dynamic nodes to which the existing template rules are to be applied. Click **Apply.**

<figure><img src="/files/gDjGf8AR5ODUqnnDPB5I" alt=""><figcaption><p><strong>Copy Template Rules</strong></p></figcaption></figure>

This applies the templates to the newly added dynamic child nodes.

You can also click on the 'data source node editor' icon beside the node to configure a template for it manually.

<figure><img src="/files/xJ2cQr9eKZa7olfhAgvh" alt=""><figcaption><p><strong>Configuring a template</strong></p></figcaption></figure>


# Import Template

If you want to apply an already created template into your model, choose **Templates->Import Template** in the pop-up menu.

<figure><img src="/files/NGjOiykjtbF2hYvbFJHD" alt="" width="375"><figcaption><p><strong>Import a Template</strong></p></figcaption></figure>

Selecting this option will open the System Dialog box where you can choose the template you want to import.


# Export Template

Previously created templates can be exported to your local system so that they can be used for the future by importing them back to the model.

To export your template, click **Templates** and then select **Export Template.**

<figure><img src="/files/itYDLf3tx2QCLqnmEuze" alt=""><figcaption><p><strong>Export Template</strong></p></figcaption></figure>

Click **Yes** in the confirmation pop-up to download it locally.


# Formula Functions

ValQ supports many traditional user-friendly functions that allow you to create complex models. You can use these functions under **Configuration** in the Model Tab while writing formulae for the **Formula** type nodes to build/edit the models.

A formula can contain functions, expressions, references and constants.

1. Function takes in one or more values and performs a defined operation to return a result. Every function is defined with a keyword and a specific syntax that is to be followed.&#x20;
2. Expressions are node names with logical or mathematical operators that specify the operation to be performed.
3. References are the node names that refer to the nodes from the model and contain those values.
4. Constant refers to a value or a number that does not change.

Let us first see the logical, mathematical and other operators.

## Logical Operators

<table><thead><tr><th width="264">OPERATORS</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td>&#x26;&#x26;</td><td>Logical AND</td></tr><tr><td>||</td><td>Logical OR</td></tr></tbody></table>

## Mathematical and Other Operators

<table><thead><tr><th width="265">OPERATORS</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td>()</td><td>Parenthesis</td></tr><tr><td>+, -</td><td>plus, minus(-1) sign</td></tr><tr><td>*, /</td><td>Multiplication, Division</td></tr><tr><td>+, -</td><td>Addition, Subtraction</td></tr><tr><td>==, !=</td><td>Equal to, Not equal to</td></tr><tr><td>>, >=</td><td>Greater than, Greater than or equal to</td></tr><tr><td>&#x3C;, &#x3C;=</td><td>Less than, Less than or equal to</td></tr></tbody></table>

In the upcoming sections, we'll explore the different functions along with relevant examples for a better understanding.

{% hint style="info" %}
**Note:**

1. The arguments with a ? in the function syntax are optional arguments based on the use-case. When there is no optional argument, a function performs according to its default settings.
2. In function syntax, **- > number** refers to the numerical result of the performed function.
3. **valueN?** refers to the unlimited 'N' number of arguments that a function can accept.
4. Node references have been enclosed within square brackets, and each node is shown in a different color scheme for easy comprehension.

&#x20;      e.g. *Sales* node is represented as <mark style="color:purple;">\[Sales]</mark> and so on. In ValQ, along with colour scheme, the complete lineage of nodes are displayed when you choose them from the pop-up.

5. Text in blue represents the keywords in formula functions of ValQ.
   {% endhint %}


# Logical Functions

<table><thead><tr><th width="117">NAME</th><th width="309">SYNTAX</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><a href="/pages/4QlpTRgJWa1duB8nckby">IF</a></td><td>IF(logical_test, value_if_true, value_if_false)</td><td>Checks whether a condition is met and returns the first value if TRUE and second value if FALSE.</td></tr><tr><td><a href="/pages/HPzyl9LrCak2mvA9zbEg">SWITCH</a></td><td>SWITCH(expression, value1, result1, value2, result2, ...,value_n, result_n, default?)</td><td>Evaluates an expression against a list of values and returns the result corresponding to the first matching value. If there is no match, an optional default value is returned.</td></tr><tr><td><a href="/pages/sP2oYy6ouv1pQEVg9haS">AND</a></td><td>AND(logical_test1,...logical_test2?)</td><td>Checks whether all the arguments are TRUE, and returns TRUE only if all the arguments are TRUE</td></tr><tr><td><a href="/pages/d9l8RYRktXvEdGwDGAL0">OR</a></td><td>OR(logical_test1,...logical_test2?)</td><td>Checks whether any of the arguments are TRUE, and returns TRUE or FALSE. Returns FALSE only if all the arguments are FALSE</td></tr><tr><td><a href="/pages/Ma9jNoAg770oVMAqLooL">NOT</a></td><td>NOT(logical_test)</td><td>Reverses FALSE to TRUE, or TRUE to FALSE</td></tr><tr><td><a href="/pages/1CP1svWLXnzG7OKR3Hr9">XOR</a></td><td>XOR(logical_test1,...logical_test2?)</td><td>Returns a logical 'Exclusive Or' of all the arguments</td></tr><tr><td><a href="/pages/2bV9zS5A5TeaAbxccgkc">IFNAN</a></td><td>IFNAN(value1,value2?:number) - > number</td><td>Returns a default value if the value in the node is an error</td></tr></tbody></table>


# IF

An IF statement returns a value depending on whether the condition that is being evaluated is TRUE or FALSE.

### Syntax

IF(logical\_test, value\_if\_true, value\_if\_false)

### Arguments

<table><thead><tr><th width="153">Arguments</th><th width="163">Data Type</th><th>Condition</th></tr></thead><tbody><tr><td>logical_test</td><td>Text / Number</td><td>The condition to be evaluated.</td></tr><tr><td>value_if_true</td><td>Node reference / Number</td><td>The value to be returned if the condition is met.</td></tr><tr><td>value_if_false</td><td>Node reference / Number</td><td>The value to be returned if the condition is not met.</td></tr></tbody></table>

### Return Value

Either *value\_if\_true* or *value\_if\_false.*

### Remarks

1. Returns Blank when the formula is misspelled.
2. The specified node should contain Numerical data.
3. The IF function returns error in any of the following cases:

* *value\_if\_false* argument is missing.
* The argument *value\_if\_true* or *value\_if\_false* are not of numeric data type.
* Not using appropriate operator in *logical\_test*.

### Example

Consider the **Revenue** and **Cost of Goods Sold** nodes to follow the trend as shown below.

<table><thead><tr><th width="137">Parameter</th><th align="center">Jan</th><th align="center">Feb</th><th align="center">Mar</th><th align="center">Apr</th><th align="center">May</th><th align="center">Jun</th></tr></thead><tbody><tr><td><mark style="color:purple;">Revenue</mark></td><td align="center">100</td><td align="center">124</td><td align="center">137</td><td align="center">0</td><td align="center">23</td><td align="center">45</td></tr><tr><td><mark style="color:orange;">Cost of Goods Sold</mark></td><td align="center">25</td><td align="center">25</td><td align="center">25</td><td align="center">25</td><td align="center">25</td><td align="center">25</td></tr></tbody></table>

Now, a new node **Gross Profit Margin** can be computed using the IF function. Gross Profit Margin is calculated as (Revenue-Cost of Goods Sold)/Revenue. In case Revenue has period value of 0, Gross Profit Margin should return 0.

To achieve this, the following formula should be written in the \[Gross Profit Margin] node:

<mark style="color:blue;">**`IF`**</mark>**`(`**<mark style="color:purple;">**`[Revenue]`**</mark>**`==0,0%,(`**<mark style="color:purple;">**`[Revenue]`**</mark>**`-`**<mark style="color:orange;">**`[Cost of Goods Sold]`**</mark>**`)/`**<mark style="color:purple;">**`[Revenue]`**</mark>**`)`**

### Result

<table><thead><tr><th width="134">Parameter</th><th align="center">Jan</th><th align="center">Feb</th><th align="center">Mar</th><th align="center">Apr</th><th align="center">May</th><th align="center">Jun</th></tr></thead><tbody><tr><td>Gross Profit Margin</td><td align="center">75%</td><td align="center">80%</td><td align="center">82%</td><td align="center">0%</td><td align="center">-9%</td><td align="center">44%</td></tr></tbody></table>

As you can see from the above table, if the logical test condition (Revenue==0) is True, it returns 0, i.e. the gross profit margin is 0 and if the logical test condition is False (Revenue is a non-zero number), it calculates the Gross Profit Margin from the formula and returns it.

{% hint style="info" %}
Use **SWITCH** function instead of nesting multiple IF functions.
{% endhint %}


# SWITCH

A SWITCH statement evaluates an expression against a list of values and returns the result corresponding to the first matching value. If there is no match, an optional default value is returned.

### Syntax

SWITCH(expression, value1, result1, value2, result2, ..., value\_n, result\_n, default?)

### Arguments

<table><thead><tr><th width="248">Arguments</th><th width="190">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>expression</td><td>Text, Number, Node reference</td><td>The statement to be evaluated.</td></tr><tr><td>value1, value2, … value_n</td><td>Number</td><td>The list of values to be compared against the expression.</td></tr><tr><td>result1, result2, … result_n</td><td>Number</td><td>The result to be returned if the expression matches with the corresponding value in the argument list.</td></tr><tr><td>default?</td><td> Number</td><td>The default value to be returned if the expression does not match with any of the values in the argument list. This is an optional argument.</td></tr></tbody></table>

### Return Value

Result when the expression matches with value, default in case there was no match.

### Remarks

All result expressions and the default expression must be of the same data type.

### Examples

1. In the below given table, discount rate is 20% for every month. Consider a scenario in which the node Discount Rate is to be calculated based on the current month. Months Jan, Aug, Nov and Dec should have 15% as discount rate whereas the remaining months should have 20%.

<figure><img src="/files/ypnlvMrVN3v1mRNOkiDM" alt=""><figcaption></figcaption></figure>

To achieve this, the following formula should be written in the \[Discount Rate] node:

<mark style="color:blue;">**`SWITCH`**</mark>**`(`**<mark style="color:blue;">**`CURRENT_PERIOD_INDEX`**</mark>**`,1,0.15,8,0.15,11,0.15,12,0.15,0.20)`**

The result of the above formula is shown below:

<figure><img src="/files/abO4EOUbG4O9cuveo2Kw" alt=""><figcaption></figcaption></figure>

In the above example, if the current period's index value is 1,8,11 and 12 (which is the case for Jan, Aug, Nov and Dec periods), their corresponding matching result of 15% is returned. For other periods, the default discount rate of 20% is returned.

2. Consider a scenario where Year 1's estimated unit sales value and Year 5's target operating income are given. You need to calculate the unit sales for further periods. Since we have different calculations for each period we can use the SWITCH function to specify the calculation for each period.

|                                                                     |           |
| ------------------------------------------------------------------- | --------- |
| <mark style="color:yellow;">Target Operating income (year 5)</mark> | $1,00,000 |
| Year 1 estimated unit sales                                         | 100       |

<table><thead><tr><th width="183">Period</th><th width="109" align="center">1</th><th width="118" align="center">2</th><th width="118" align="center">3</th><th width="118" align="center">4</th><th align="center">5</th></tr></thead><tbody><tr><td><mark style="color:green;">Growth%</mark> </td><td align="center"> N/A </td><td align="center">10.0%</td><td align="center">50.0%</td><td align="center">75.0%</td><td align="center">100.0%</td></tr><tr><td><mark style="color:purple;">Unit price</mark></td><td align="center">400.00</td><td align="center">420.00</td><td align="center">441.00</td><td align="center">463.05</td><td align="center">486.20</td></tr><tr><td><mark style="color:orange;">Unit cost</mark></td><td align="center">250.00</td><td align="center">262.50</td><td align="center">275.63</td><td align="center">289.41</td><td align="center">303.88</td></tr><tr><td><mark style="color:red;">Fixed cost</mark></td><td align="center">250000</td><td align="center">257500</td><td align="center">265225</td><td align="center">273181.8</td><td align="center">281377.2</td></tr></tbody></table>

This can be achieved by using the SWITCH function in the following manner:

<mark style="color:blue;">**`SWITCH`**</mark>**`(`**<mark style="color:blue;">**`CPI`**</mark>**`1,100,2,`**<mark style="color:blue;">**`THIS`**</mark>**`.`**<mark style="color:blue;">**`PERIOD_LOOKUP`**</mark>**`(3,100)`**<mark style="color:green;">**`[Growth%]`**</mark>**`,3,`**<mark style="color:blue;">**`THIS`**</mark>**`.`**<mark style="color:blue;">**`PERIOD_LOOKUP`**</mark>**`(2,100)`**<mark style="color:green;">**`[Growth%]`**</mark>**`,4,`**<mark style="color:blue;">**`THIS`**</mark>**`.`**<mark style="color:blue;">**`PERIOD_LOOKUP`**</mark>**`(1,100)*`**<mark style="color:green;">**`[Growth%]`**</mark>**`,5,(`**<mark style="color:red;">**`[Fixed cost]`**</mark>**`+`` `**<mark style="color:yellow;">**`[Target Operating income]`**</mark>**` ``)/(`**<mark style="color:purple;">**`[Unit price]`**</mark>**`-`` `**<mark style="color:orange;">**`[Unit cost]`**</mark>**`))`**

The result of the above formula is shown below:

|   Period   |  1  |  2  |   3  |   4  |   5  |
| :--------: | :-: | :-: | :--: | :--: | :--: |
| Unit Sales | 100 | 209 | 1045 | 1568 | 2091 |

{% hint style="info" %}
Refer [THIS](/model/formula-functions/static-identifiers/this-me), [CPI ](/model/formula-functions/static-identifiers/current_period_index)and [PERIOD\_LOOKUP](/model/formula-functions/range-functions/period_lookup) functions to understand why and how they are used in the above formula.
{% endhint %}

### Explanation

For period 1 the value is 100, for period 5 the unit sales is calculated as **(fixed cost + targeted operating income)/(Unit price - Unit Cost)**. Periods 2, 3 & 4 are calculated as the product of 5th period value and growth percentage. For this [period lookup function](/model/formula-functions/range-functions/period_lookup) is used.


# AND

An AND function returns TRUE only if all the conditions are TRUE and returns FALSE if one or more conditions are FALSE.

### Syntax

AND(logical\_test1, ...logical\_test2?)

### Arguments

<table><thead><tr><th width="170">Arguments</th><th width="150">Data type</th><th>Description</th></tr></thead><tbody><tr><td>logical_test1</td><td>Number,text</td><td>The first condition to be evaluated. This is a required argument.</td></tr><tr><td>logical_test2?</td><td>Number,text</td><td>The additional conditions to be evaluated. These are optional arguments.</td></tr></tbody></table>

### Return Value

Either True or False values that are given in the arguments.

### Remarks

AND function accepts multiple conditions.

### Example

Consider the below scenario in which, if the number of licenses are greater than 500 **and** usage period is lesser than 24 months, the price should be $20 else $25.

<table data-full-width="true"><thead><tr><th width="178">Particulars</th><th width="122" align="center">Jan</th><th width="107" align="center">Feb</th><th width="112" align="center">Mar</th><th width="124" align="center">Apr</th><th width="140" align="center">May</th><th align="center">Jun</th></tr></thead><tbody><tr><td><mark style="color:purple;">No of Licenses</mark></td><td align="center">498</td><td align="center">497</td><td align="center">502</td><td align="center">505</td><td align="center">502</td><td align="center">498</td></tr><tr><td><mark style="color:orange;">Duration</mark></td><td align="center">25</td><td align="center">21</td><td align="center">22</td><td align="center">26</td><td align="center">23</td><td align="center">25</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[Price] node:

<mark style="color:blue;">**`IF`**</mark>**`(`**<mark style="color:blue;">**`AND`**</mark>**`(`**<mark style="color:purple;">**`[No of Licenses]`**</mark>**`>500,`**<mark style="color:orange;">**`[Duration]`**</mark>**`<24),20,25)`**

### Result

<table><thead><tr><th width="129">Particulars</th><th align="center">Jan</th><th align="center">Feb</th><th align="center">Mar</th><th align="center">Apr</th><th align="center">May</th><th align="center">Jun</th></tr></thead><tbody><tr><td>Price</td><td align="center">25</td><td align="center">25</td><td align="center">20</td><td align="center">25</td><td align="center">20</td><td align="center">25</td></tr></tbody></table>

As you can see, the price is 20 when both the conditions (No of licenses>500 and Duration<24) are true (in Mar and May). Even if one of the conditions is false, as seen for the other periods, the price is 25.


# OR

An OR statement returns TRUE if at least one of the conditions is TRUE and returns FALSE when all the conditions evaluate to FALSE.

### Syntax

OR(logical\_test1, ...logical\_test2?)

### Arguments

<table><thead><tr><th width="158.93969144460027">Arguments</th><th width="170">Datatype</th><th width="448">Descriptions</th></tr></thead><tbody><tr><td>logical_test1</td><td>Node reference,Number</td><td>The first condition to be evaluated. This is a required argument.</td></tr><tr><td>logical_test2?</td><td>Node reference,Number</td><td>The additional conditions to be evaluated. These are optional arguments.</td></tr></tbody></table>

### Return Value

Either True or False values that are given in the arguments.

### Remarks

OR function accepts multiple conditions.

### Example

Consider the below scenario in which if the Sales Quantity is greater than 50 **or** the usage Customer Ranking is 1, the price should be $20 else $25.

<table><thead><tr><th width="125">Periods</th><th align="center">Jan</th><th align="center">Feb</th><th align="center">Mar</th><th align="center">Apr</th><th align="center">May</th><th align="center">Jun</th></tr></thead><tbody><tr><td><mark style="color:purple;">Sales Quantity</mark> </td><td align="center">50</td><td align="center">55</td><td align="center">45</td><td align="center">65</td><td align="center">25</td><td align="center">31</td></tr><tr><td><mark style="color:orange;">Customer Ranking</mark></td><td align="center">1</td><td align="center">1</td><td align="center">2</td><td align="center">2</td><td align="center">1</td><td align="center">2</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[Price] node:

<mark style="color:blue;">**`IF`**</mark>**`(`**<mark style="color:blue;">**`OR`**</mark>**`(`**<mark style="color:purple;">**`[Sales Quantity]`**</mark>**`>50,`**<mark style="color:orange;">**`[Customer Ranking]`**</mark>**`==1),20,25)`**

### Result

<table><thead><tr><th width="129">Parameter</th><th align="center">Jan</th><th align="center">Feb</th><th align="center">Mar</th><th align="center">Apr</th><th align="center">May</th><th align="center">Jun</th></tr></thead><tbody><tr><td>Price</td><td align="center">20</td><td align="center">20</td><td align="center">25</td><td align="center">20</td><td align="center">20</td><td align="center">25</td></tr></tbody></table>

As you can see from the above table, the result will be 20 even if one of the conditions is true and it will be 25 only when both of the conditions are false. In Feb, both of the conditions are True & in Jan, Apr and May one of the conditions is true. So the result is 20. But in Mar both the conditions are false, so the result is 25.


# NOT

A NOT statement reverses the value of the condition. For example, it returns TRUE if the condition is FALSE and FALSE if the condition is TRUE.

### Syntax

NOT(logical\_test)

### Arguments

<table><thead><tr><th width="147">Argument</th><th width="212">Data type</th><th>Description</th></tr></thead><tbody><tr><td>logical_test</td><td>Node reference, Formula</td><td>The condition to be evaluated</td></tr></tbody></table>

### Return Value

Either True or False.

### Example

Consider the below scenario in which an employee is eligible for Sales Bonus if Total Sales is greater than the Sales Goal. Sales Bonus is calculated as the product of Bonus% and Total Sales.

<figure><img src="/files/CiQSLHh7EPcIdawWGX2p" alt=""><figcaption></figcaption></figure>

To achieve this, the following formula should be written on the \[Sales Bonus] node:

<mark style="color:blue;">**`IF`**</mark>**`(`**<mark style="color:blue;">**`NOT`**</mark>**`(`**<mark style="color:purple;">**`[Total Sales]`**</mark>**`>`**<mark style="color:orange;">**`[Sales Goal]`**</mark>**`),0,`**<mark style="color:red;">**`[Bonus %]`**</mark>**`*`**<mark style="color:purple;">**`[Total Sales]`**</mark>**`)`**

### Result

Here, the condition Total Sales > Sales Goal is TRUE for Jan, but NOT function negates it and returns FALSE. Hence the argument value for FALSE condition which is "Bonus% \* Total Sales" is calculated. For all TRUE condition, its matching argument 0 is the result.

<figure><img src="/files/IDkVpXEknxmI3hbRBKsd" alt=""><figcaption></figcaption></figure>


# XOR

A XOR statement returns a logical 'Exclusive Or' of all arguments. XOR gives TRUE only when the conditions return different truth values.

<table><thead><tr><th width="396">Arguments</th><th>Result</th></tr></thead><tbody><tr><td>1 or more test conditions return different results (TRUE and FALSE) </td><td>TRUE</td></tr><tr><td>All the conditions are TRUE</td><td>FALSE</td></tr><tr><td>All the conditions are FALSE</td><td>FALSE</td></tr></tbody></table>

### Syntax

XOR(logical\_test1, ...logical\_test2?)

### Arguments

<table><thead><tr><th width="156.76">Arguments</th><th width="172">Data type</th><th width="459">Description</th></tr></thead><tbody><tr><td>logical_test1</td><td>Node reference,number</td><td>The first condition to be evaluated. This is a required argument.</td></tr><tr><td>logical_test2?</td><td>Node reference,number</td><td>The additional conditions to be evaluated. These are optional arguments.</td></tr></tbody></table>

### Return Value

Either True or False.

### Remarks

**OR** : If at least 1 of the conditions is TRUE, the result is TRUE.

**XOR** : If only 1 of the conditions is TRUE, the result is TRUE but if both the conditions are TRUE the result is FALSE. XOR returns TRUE only if the conditions give different results, if both give the same results, XOR returns a FALSE.

### Example

Consider the below scenario, where the price should be 20, if either Sales Quantity is greater than 50 or Customer Ranking = 1, but not both. It should be 25 otherwise.

<figure><img src="/files/CoFegscVXxT3JUqB2aqy" alt=""><figcaption></figcaption></figure>

To achieve this, the following formula should be written on the \[Price] node:

<mark style="color:blue;">**`IF`**</mark>**`(`**<mark style="color:blue;">**`XOR`**</mark>**`(`**<mark style="color:purple;">**`[Sales Quantity]`**</mark>**`>50,`**<mark style="color:orange;">**`[Customer Ranking]`**</mark>**`==1),20,25)`**

### **Result**

<figure><img src="/files/bpVFhYutHQFCth2vMvRg" alt=""><figcaption></figcaption></figure>

As you can see from the above table, the result will be 20 when either of the conditions is true and it will be 25 when both the conditions are true/false. In Feb, both the conditions are TRUE so the result is False and the corresponding value for FALSE is returned which is 25. In Mar, both the conditions are FALSE so again the result in 25. Whereas in Jan, only 1 of the arguments is TRUE so the value will be 20.


# IFNAN

The IFNAN function checks for error and returns the default value if the value in the node is an error.

### Syntax

IFNAN(value1, value2?: number) - > number

### Arguments

<table><thead><tr><th width="161">Arguments</th><th width="141">Data type</th><th>Description</th></tr></thead><tbody><tr><td>value1</td><td>Number,Node reference</td><td>The node that is to be checked for error values.</td></tr><tr><td>value2?: number</td><td>Number,Node reference</td><td>The value that should replace the errors. The value should be of numerical datatype only.</td></tr></tbody></table>

### Return Value

value2 in the place of Error.

### Example

Consider the nodes **Total Cost** and **No. of units** to have the periods values as shown below:

<figure><img src="/files/yub8jlry5ciPMkFcIs99" alt=""><figcaption></figcaption></figure>

Now, Cost per unit is calculated by dividing the Total Cost by No. of units. If IFNAN is not applied, the result would be as follows due to 'divide by zero' error:

<figure><img src="/files/iXhXz3gVEcQ6zY4irw0f" alt=""><figcaption><p><strong>Before applying IFNAN</strong></p></figcaption></figure>

The error is to be replaced with 0. To achieve this, the following formula should be written in the \[Cost Per Unit] node:

<mark style="color:blue;">**`IFNAN`**</mark>**`(`**<mark style="color:purple;">**`[Total Cost]`**</mark>**`/`**<mark style="color:orange;">**`[No. of units]`**</mark>**`,0)`**

### **Result**

<figure><img src="/files/vhsa9LHFuzGBpRtPMZbE" alt=""><figcaption><p><strong>After applying IFNAN</strong></p></figcaption></figure>


# Math Functions

<table><thead><tr><th width="224">NAME</th><th width="244">SYNTAX</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><a href="/pages/oRnhR4fnA1OJMgLsnUCd">SUM</a></td><td>SUM(value1,… valueN?) - > number</td><td>Adds all the numbers in the arguments, which can be numbers or node references</td></tr><tr><td><a href="/pages/7ZVJyaAvEiWirK6nQQiM">SUBTRACT</a></td><td>SUBTRACT(value1,… valueN?) - > number</td><td>Subtracts all the values in the arguments, which can be numbers or node references</td></tr><tr><td><a href="/pages/MFOnmLUnZUJsH16xJnV7">PRODUCT</a></td><td>PRODUCT(value1,… valueN?) - > number</td><td>Multiplies all the values in the arguments</td></tr><tr><td><a href="/pages/M8eUUlMFRK1Pt5z1KY6f">DIVISION</a></td><td>DIVISION(value1,… valueN?) - > number</td><td>Divides all the values in the arguments</td></tr><tr><td><a href="/pages/FuBm5qK9CA1Tib5C7mjo">AVERAGE</a></td><td>AVERAGE(value1,...valueN?) - > number</td><td>Returns the average (arithmetic mean) of its arguments, which can be numbers or node references</td></tr><tr><td><a href="/pages/OBIu3cq6DR9mUDKnPMwx">AVERAGEEXZERO</a></td><td>AVERAGEEXZERO(value1,...valueN?) - > number</td><td>Returns the average (arithmetic mean) of its arguments excluding zeros, which can be numbers or node references</td></tr><tr><td><a href="/pages/maML9rFUUbsZlWwc6HT9">AVERAGEEXNEG</a></td><td>AVERAGEEXNEG(value1,...valueN?) - > number</td><td>Returns the average (arithmetic mean) of its arguments excluding negatives, which can be numbers or node references</td></tr><tr><td><a href="/pages/ABIJGFjRZa3zwQ58wvLO">AVERAGEEXZERONEG</a></td><td>AVERAGEEXZERONEG (value1,...valueN?) - > number</td><td>Returns the average (arithmetic mean) of its arguments excluding zeros and negatives, which can be numbers or node references</td></tr><tr><td><a href="/pages/ONSV1feoPRsMW6OzB5qx">COUNT</a></td><td>COUNT(value1,...valueN?) - > number</td><td>Counts the number of items in a range</td></tr><tr><td><a href="/pages/L4DAMf9eAU18ep4DhRZX">ABS</a></td><td>ABS(value) - > number</td><td>Returns the absolute value of a number, a number without its sign</td></tr><tr><td><a href="/pages/w4DLuQNZDW6TfKzCPe3O">MIN</a></td><td>MIN(value1,...valueN?) - > number</td><td>Returns the smallest number in a set of values. Node references are also accepted as arguments</td></tr><tr><td><a href="/pages/tdMEatsHZjmDkBiatZ28">MAX</a></td><td>MAX(value1,...valueN?) - > number</td><td>Returns the largest number in a set of values. Node references are also accepted as arguments</td></tr><tr><td><a href="/pages/HZZ94QlCPupd25oBj5xQ">POWER</a></td><td>POW(value,power) - > number</td><td>Returns the result of a number raised to a power</td></tr><tr><td><a href="/pages/KO3zGKwInwASINAZNi7Y">SQRT</a></td><td>SQRT(value) - > number</td><td>Returns the square root of a number</td></tr><tr><td><a href="/pages/J4RZ4lWgbqLcIWdsuNMD">EXP</a></td><td>EXP(value) - > number</td><td>Returns e raised to the power of a given number</td></tr><tr><td><a href="/pages/a6vp8QBbRa9cw3F8SAo0">LOG</a></td><td>LOG(value,base) - > number</td><td>Returns the logarithm of a number to the base you specify</td></tr><tr><td><a href="/pages/PPE2KFetGWJcaCKC5mlj">ROUND</a></td><td>ROUND(value) - > number</td><td>Returns the rounded value of the specified node, number</td></tr><tr><td><a href="/pages/IPlutwf3GM5VqxyLh6sC">FLOOR</a></td><td>FLOOR(value) - > number</td><td>Returns the rounded down value of the specified node, number</td></tr><tr><td><a href="/pages/yJJLR9iJOos8PQ9ef1E3">CEILING</a></td><td>CEIL(value) - > number</td><td>Returns the rounded up value of the specified node, number</td></tr></tbody></table>


# SUM

The SUM function returns the sum of all numbers in the arguments, which can be numbers or node references.

### Syntax

SUM(value1, ...valueN?) - > number

### Arguments

<table><thead><tr><th width="159">Arguments</th><th width="148">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>value1</td><td>Number/Node reference</td><td>The first node or number to be added. This is a required argument.</td></tr><tr><td>...valueN?</td><td>Number/Node reference</td><td>The additional nodes or numbers to be added. These are optional arguments.</td></tr></tbody></table>

### Example

Consider sales of a particular product across different regions East, South, Central and West to be as follows. The total sales is to be calculated.

<figure><img src="/files/2mVNLAwLGwjTavWDtlYL" alt=""><figcaption></figcaption></figure>

To achieve this, the following formula should be written in the \[Total Sales] node:

<mark style="color:blue;">**`SUM`**</mark>**`(`**<mark style="color:purple;">**`[East],`**</mark><mark style="color:orange;">**`[South]`**</mark>**`,`**<mark style="color:red;">**`[Central]`**</mark>**`,`**<mark style="color:green;">**`[West]`**</mark>**`)`**

### **Result**

<figure><img src="/files/S7M69eNERIucSIzuoSsy" alt=""><figcaption><p><strong>Sum</strong></p></figcaption></figure>


# SUBTRACT

The SUBTRACT function returns the difference of all values in the arguments.

### Syntax

SUBTRACT(value1, ...valueN?) - > number

### Arguments

<table><thead><tr><th width="159">Arguments</th><th width="148">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>value1</td><td>Number/Node reference</td><td>The first node or number to be subtracted. This is a required argument.</td></tr><tr><td>...valueN?</td><td>Number/Node reference</td><td>The additional nodes or numbers to be subtracted. These are optional arguments.</td></tr></tbody></table>

### Example

Consider the below example where we have Revenue and expenses data. The objective is to calculate the profit.

<table><thead><tr><th width="237">Periods</th><th width="138">Jan</th><th width="129">Feb</th><th width="133">Mar</th><th width="115">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td>  <mark style="color:purple;">Revenue</mark></td><td>300</td><td>450</td><td>367</td><td>408</td><td>832</td><td>671</td><td>700</td><td>260</td><td>572</td><td>903</td><td>534</td><td>671</td></tr><tr><td>       Sales</td><td>180</td><td>200</td><td>238</td><td>174</td><td>286</td><td>319</td><td>265</td><td>136</td><td>220</td><td>260</td><td>300</td><td>315</td></tr><tr><td>       Other revenue</td><td>120</td><td>250</td><td>129</td><td>234</td><td>546</td><td>352</td><td>435</td><td>124</td><td>352</td><td>643</td><td>234</td><td>356</td></tr><tr><td>  <mark style="color:orange;">Expenses</mark></td><td>170</td><td>173</td><td>360</td><td>264</td><td>174</td><td>184</td><td>582</td><td>273</td><td>503</td><td>296</td><td>295</td><td>484</td></tr><tr><td>        Rent </td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td></tr><tr><td>        Other expenses</td><td>120</td><td>123</td><td>310</td><td>214</td><td>124</td><td>134</td><td>532</td><td>223</td><td>453</td><td>246</td><td>245</td><td>434</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[Profit] node.

<mark style="color:blue;">**`SUBTRACT`**</mark>**`(`**<mark style="color:purple;">**`[Revenue]`**</mark>**`,`**<mark style="color:orange;">**`[Expenses]`**</mark>**`)`**

### **Result**

<table data-header-hidden><thead><tr><th width="156">Column1</th><th width="153">Column2</th><th width="84">Column3</th><th width="84">Column4</th><th width="84">Column5</th><th width="84">Column6</th><th width="84">Column7</th><th width="84">Column8</th><th width="84">Column9</th><th width="92">Column10</th><th width="92">Column11</th><th width="92">Column12</th><th width="92">Column13</th></tr></thead><tbody><tr><td>Profit</td><td>130</td><td>277</td><td>7</td><td>144</td><td>658</td><td>487</td><td>118</td><td>-13</td><td>69</td><td>607</td><td>239</td><td>187</td></tr></tbody></table>


# PRODUCT

The PRODUCT function returns the product of all values in the arguments.

### Syntax

PRODUCT(value1, ...valueN?) - > number

### Arguments

<table><thead><tr><th width="159">Arguments</th><th width="148">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>value1</td><td>Number/Node reference</td><td>The first node or number to be multiplied. This is a required argument.</td></tr><tr><td>...valueN?</td><td>Number/Node reference</td><td>The additional nodes or numbers to be multiplied. These are optional arguments.</td></tr></tbody></table>

### Example

Consider the below example where we have data for Units sold and price. The objective is to calculate Sales value by multiplying Units sold with Unit price.

<table><thead><tr><th width="163">Periods</th><th width="133">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td><mark style="color:purple;">Units sold</mark></td><td>2000</td><td>2351</td><td>978</td><td>1520</td><td>2415</td><td>3154</td><td>1548</td><td>3144</td><td>2458</td><td>3654</td><td>1452</td><td>2548</td></tr><tr><td><mark style="color:orange;">Unit price</mark></td><td>6</td><td>11</td><td>6</td><td>7</td><td>8</td><td>11</td><td>7</td><td>10</td><td>6</td><td>5</td><td>9</td><td>12</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[Sales] node.

<mark style="color:blue;">**`PRODUCT`**</mark>**`(`**<mark style="color:purple;">**`[Units sold]`**</mark>**`,`**<mark style="color:orange;">**`[Unit price]`**</mark>**`)`**

### **Result**

<table data-header-hidden><thead><tr><th width="163">Column1</th><th width="133">Column2</th><th width="84">Column3</th><th width="84">Column4</th><th width="84">Column5</th><th width="84">Column6</th><th width="84">Column7</th><th width="84">Column8</th><th width="84">Column9</th><th width="92">Column10</th><th width="92">Column11</th><th width="92">Column12</th><th width="92">Column13</th></tr></thead><tbody><tr><td>Sales</td><td>12000</td><td>25861</td><td>5868</td><td>10640</td><td>19320</td><td>34694</td><td>10836</td><td>31440</td><td>14748</td><td>18270</td><td>13068</td><td>30576</td></tr></tbody></table>


# DIVISION

The DIVISION function returns the division of all numbers in the arguments, which can be numbers or node references.

### Syntax

DIVISION(value1, ...valueN?) - > number

### Arguments

<table><thead><tr><th width="159">Arguments</th><th width="148">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>value1</td><td>Number/Node reference</td><td>The first node or number to be divided. This is a required argument.</td></tr><tr><td>...valueN?</td><td>Number/Node reference</td><td>The additional nodes or numbers to be divided. These are optional arguments.</td></tr></tbody></table>

### Example

Consider the below example where Revenue and Cost of Sales Is given. Calculate Gross Profit%.

<table><thead><tr><th width="97"></th><th width="103">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td><mark style="color:purple;">Revenue</mark></td><td>31400</td><td>32600</td><td>35100</td><td>32600</td><td>31900</td><td>33700</td><td>35000</td><td>31700</td><td>33600</td><td>34100</td><td>32500</td><td>33000</td></tr><tr><td><mark style="color:orange;">Cost of Sales</mark></td><td>24300</td><td>25300</td><td>25800</td><td>23300</td><td>27300</td><td>28400</td><td>21200</td><td>26900</td><td>25700</td><td>24200</td><td>28900</td><td>27300</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[Gross Profit %] node.

<mark style="color:blue;">**`DIVISION`**</mark>**`((`**<mark style="color:purple;">**`[Revenue]`**</mark>**`-`**<mark style="color:orange;">**`[Cost of Sales]`**</mark>**`),`**<mark style="color:purple;">**`[Revenue]`**</mark>**`)`**

{% hint style="info" %}
To show the values in percentage, scale should be set in Percentages.
{% endhint %}

### **Result**

<table><thead><tr><th width="185"></th><th width="135">Jan</th><th width="134">Feb</th><th width="139">Mar</th><th width="140">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td>Gross Profit %</td><td>22.61%</td><td>22.39%</td><td>26.50%</td><td>28.53%</td><td>14.42%</td><td>15.73%</td><td>39.43%</td><td>15.14%</td><td>23.51%</td><td>29.03%</td><td>11.08%</td><td>17.27%</td></tr></tbody></table>


# AVERAGE

The AVERAGE function returns the average (arithmetic mean) of its arguments, which can be numbers or node references.

### Syntax

AVERAGE(value1, ...valueN?) - > number

### Arguments

<table><thead><tr><th width="127">Arguments</th><th width="156">Data type</th><th>Description</th></tr></thead><tbody><tr><td>value1</td><td>Node reference, number</td><td>The first node or number to be averaged. This is a required argument.</td></tr><tr><td>...valueN?</td><td>Node reference, number</td><td>The additional nodes or numbers to be averaged. These are optional arguments.</td></tr></tbody></table>

### Example

Consider the below example in which the sales of a particular product across different regions East, South, Central and West are as follows. The average sales is to be calculated.

<figure><img src="/files/pH3hYbhVwAPlJoDoepeZ" alt=""><figcaption></figcaption></figure>

To achieve this, the following formula should be written in the \[Average Sales] node:

<mark style="color:blue;">**`AVERAGE`**</mark>**`(`**<mark style="color:purple;">**`[East]`**</mark>**`,`**<mark style="color:orange;">**`[South]`**</mark>**`,`**<mark style="color:red;">**`[Central]`**</mark>**`,`**<mark style="color:green;">**`[West]`**</mark>**`)`**

### **Result**

<figure><img src="/files/qrRat3onfwLEhtlPxZ5l" alt=""><figcaption><p><strong>Average</strong></p></figcaption></figure>


# AVERAGEEXZERO

The AVERAGEEXZERO function returns the average (arithmetic mean) of its arguments excluding zeros, which can be numbers or node references.

### Syntax

AVERAGEEXZERO(value1, ...valueN?) - > number

### Arguments

<table><thead><tr><th width="130.78212290502793">Arguments</th><th width="140">Datatype</th><th width="512">Description</th></tr></thead><tbody><tr><td>value1</td><td>Number/Node reference</td><td>The first node or number to be averaged. This is a required argument.</td></tr><tr><td>...valueN?</td><td>Number/Node reference</td><td>The additional nodes or numbers to be averaged. These are optional arguments.</td></tr></tbody></table>

### Example&#x20;

Consider the sales of a particular product across different regions East, South, Central and West to be as follows. Assume if sales for a particular period is zero, the product was withdrawn from the market and hence that region need not be considered when calculating the average sales.

<figure><img src="/files/SaFKis8kD5a22XBILn3I" alt=""><figcaption><p><strong>Sales</strong></p></figcaption></figure>

To achieve this, the following formula should be written in the \[Average Sales] node:

<mark style="color:blue;">**`AVERAGEEXZERO`**</mark>**`(`**<mark style="color:purple;">**`[East]`**</mark>**`,`**<mark style="color:orange;">**`[South]`**</mark>**`,`**<mark style="color:red;">**`[Central]`**</mark>**`,`**<mark style="color:green;">**`[West]`**</mark>**`)`**

### Result

<figure><img src="/files/y7OvPLOGuaqf4K58R4L6" alt=""><figcaption><p><strong>Average Excluding Zeros</strong></p></figcaption></figure>


# AVERAGEEXNEG

The AVERAGEEXNEG function returns the average (arithmetic mean) of its arguments excluding negatives, which can be numbers or node references.

### Syntax

AVERAGEEXNEG(value1, ...valueN?) - > number

### Arguments

<table><thead><tr><th width="130.6657263751763">Arguments</th><th width="140">Datatype</th><th width="512">Description</th></tr></thead><tbody><tr><td>value1</td><td>Number/Node reference</td><td>The first node or number to be averaged. This is a required argument.</td></tr><tr><td>...valueN?</td><td>Number/Node reference</td><td>The additional nodes or numbers to be averaged. These are optional arguments.</td></tr></tbody></table>

### Example&#x20;

Consider Profit of a particular product across different regions East, South, Central and West to be as follows. Assume if Profit for a particular period is negative, the product was withdrawn from the market and hence that region need not be considered for calculating average Profit.

<figure><img src="/files/hMMM1yLURxQqk2H4WSJU" alt=""><figcaption></figcaption></figure>

To achieve this, the following formula should be written in the \[Average Sales] node:

<mark style="color:blue;">**`AVERAGEEXNEG`**</mark>**`(`**<mark style="color:purple;">**`[East]`**</mark>**`,`**<mark style="color:orange;">**`[South]`**</mark>**`,`**<mark style="color:red;">**`[Central]`**</mark>**`,`**<mark style="color:green;">**`[West]`**</mark>**`)`**

### Result

<figure><img src="/files/WZKkxnKkb986RTXR72n8" alt=""><figcaption><p><strong>Average Excluding Negative</strong></p></figcaption></figure>


# AVERAGEEXZERONEG

The AVERAGEEXZERONEG function returns the average (arithmetic mean) of its arguments excluding both zeros and negatives, which can be numbers or node references.

### Syntax

AVERAGEEXZERONEG(value1, ...valueN?) - > number

### Arguments

<table><thead><tr><th width="135.51267605633802">Arguments</th><th width="143">Datatype</th><th width="512">Description</th></tr></thead><tbody><tr><td>value1</td><td>Number/Node reference</td><td>The first node or number to be averaged. This is a required argument.</td></tr><tr><td>...valueN?</td><td>Number/Node reference</td><td>The additional nodes or numbers to be averaged. These are optional arguments.</td></tr></tbody></table>

### Example

Consider the Profit of a particular product across different regions East, South, Central and West to be as follows. Assume that if Profit for a particular period is negative or zero, the product was withdrawn from the market and hence that region need not be considered when calculating average Profit.

<figure><img src="/files/hMMM1yLURxQqk2H4WSJU" alt=""><figcaption></figcaption></figure>

To achieve this, the following formula should be written in the \[Average Sales] node:

<mark style="color:blue;">**`AVERAGEEXZERONEG`**</mark>**`(`**<mark style="color:purple;">**`[East]`**</mark>**`,`**<mark style="color:orange;">**`[South]`**</mark>**`,`**<mark style="color:red;">**`[Central]`**</mark>**`,`**<mark style="color:green;">**`[West]`**</mark>**`)`**

### Result

<figure><img src="/files/WZKkxnKkb986RTXR72n8" alt=""><figcaption><p><strong>Average Excluding Zero and Negative</strong></p></figcaption></figure>


# COUNT

The COUNT function counts the number of items in a range.

### Syntax

COUNT(value1, ...valueN?) - > number

### Arguments

<table><thead><tr><th width="141.33333333333331">Arguments</th><th width="167">Datatype</th><th>Description </th></tr></thead><tbody><tr><td>value1</td><td>Node reference</td><td>The first node or number to be counted. This is a required argument.</td></tr><tr><td>...valueN?</td><td>Node reference</td><td>The additional nodes or numbers to be counted. These are optional arguments.</td></tr></tbody></table>

### Example&#x20;

Consider a scenario where you want to calculate the number of periods for which the simulations are performed for a \[Sales] node. That is if simulation period is between July and September, the result should be 3.

| Sim.Months | July | August | September |
| ---------- | ---- | ------ | --------- |

In order to calculate the number of periods, the following formula should be written in the \[COUNT] node:

<mark style="color:blue;">**`COUNT`**</mark>**` ``(`**<mark style="color:purple;">**`[Sales]`**</mark><mark style="color:blue;">**`.SIM_PERIODS`**</mark>**`)`**

{% hint style="info" %}
Refer[ \[NODE\]<mark style="color:blue;">**.SIM\_PERIODS**</mark>](https://docs.valq.com/model/formula-functions/math-functions/pages/bd9R41FrVkmuCJPGQLmc#node-.sim_periods)  to know more.
{% endhint %}

### Result

| COUNT |  3  |
| :---: | :-: |


# ABS

The ABS function returns the absolute value of a number (i.e) a number without its sign.

### Syntax

ABS(value) - > number

### Arguments

<table><thead><tr><th width="156">Arguments</th><th width="183">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>value</td><td>Number/Node reference</td><td>The node or the number for which you want the absolute of.</td></tr></tbody></table>

### Example

In the below table, data of demand and inventory are given. Consider a scenario where you want to calculate the absolute difference between demand and inventory.

<table><thead><tr><th width="134">Parameter</th><th width="93" align="center">Week 1</th><th width="112" align="center">Week 2</th><th width="104" align="center">Week 3</th><th width="91" align="center">Week 4</th><th align="center">Week 5</th></tr></thead><tbody><tr><td><mark style="color:green;">Demand</mark></td><td align="center">110</td><td align="center">95</td><td align="center">75</td><td align="center">78</td><td align="center">0</td></tr><tr><td><mark style="color:orange;">Inventory</mark></td><td align="center">85</td><td align="center">70</td><td align="center">100</td><td align="center">80</td><td align="center">25</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[Absolute Difference] node:

<mark style="color:blue;">**`ABS`**</mark>**`(`**<mark style="color:green;">**`[Demand]`**</mark>**`-`**<mark style="color:orange;">**`[Inventory]`**</mark>**`)`**

### Result

<table data-header-hidden><thead><tr><th width="128"></th><th align="center"></th><th align="center"></th><th align="center"></th><th align="center"></th><th align="center"></th></tr></thead><tbody><tr><td>Absolute Difference</td><td align="center">25</td><td align="center">25</td><td align="center">25</td><td align="center">2</td><td align="center">25</td></tr></tbody></table>

#### Note

If ABS is not used the difference between values will be as follows:

<table data-header-hidden><thead><tr><th width="128"></th><th align="center"></th><th align="center"></th><th align="center"></th><th align="center"></th><th align="center"></th></tr></thead><tbody><tr><td>Absolute Difference</td><td align="center">25</td><td align="center">25</td><td align="center">-25</td><td align="center">-2</td><td align="center">-25</td></tr></tbody></table>


# MIN

The MIN function returns the smallest number in a set of values. Node references are also accepted as arguments.

### Syntax

MIN(value1, ...valueN?) - > number

### Arguments

<table><thead><tr><th width="185">Arguments</th><th width="221">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>value1</td><td>Number, Node reference</td><td>The nodes or numbers for which you want to get the smallest value.</td></tr><tr><td>valueN?</td><td>Number, Node reference</td><td>Additional nodes or numbers for which you want to get smallest value. This is an optional argument.</td></tr></tbody></table>

### Example&#x20;

Consider a node which has the demand for a particular product for 12 months.

<figure><img src="/files/1JcX2bbixwjFy82cCWgz" alt=""><figcaption></figcaption></figure>

To calculate the minimum demand, the formula should be written in the \[Minimum Demand] node

<mark style="color:blue;">**`MIN`**</mark>**`(`**<mark style="color:purple;">**`[Demand]`**</mark>**`.`**<mark style="color:blue;">**`ALL_PERIODS`**</mark>**`)`**

We are including [**.ALL\_PERIODS**](https://docs.valq.com/model/formula-functions/math-functions/pages/bd9R41FrVkmuCJPGQLmc#node-.all_periods) so that it will consider all the period values rather than one single period.

### **Result**

| **Minimum Demand** | 136 |
| ------------------ | --- |


# MAX

The MAX function returns the largest number in a set of values. Node references are also accepted as arguments.

### Syntax

MAX(value1, ...valueN?) - > number

### Arguments

<table><thead><tr><th width="134">Arguments</th><th width="144">Data type</th><th width="448">Description</th></tr></thead><tbody><tr><td>value1</td><td>Number, Node reference</td><td>The nodes or numbers for which you want to evaluate the largest value.</td></tr><tr><td>...valueN?</td><td>Number, Node Reference</td><td>Additional nodes or numbers for which you want to evaluate the largest value. This is an optional argument.</td></tr></tbody></table>

### Example&#x20;

Consider the below example with a node that has the demand for a particular product for 12 months.

<figure><img src="/files/dpFswDRfJ98QroWMqV1g" alt=""><figcaption></figcaption></figure>

To calculate the maximum demand, the following formula should be written in the \[Maximum demand] node:

<mark style="color:blue;">**`MAX`**</mark>**`(`**<mark style="color:purple;">**`[Demand]`**</mark>**`.`**<mark style="color:blue;">**`ALL_PERIODS`**</mark>**`)`**

We are including [**.ALL\_PERIODS**](https://docs.valq.com/model/formula-functions/math-functions/pages/bd9R41FrVkmuCJPGQLmc#node-.all_periods) so that it will consider all the period values rather than one single period.

### Result

| **Maximum Demand** | 319 |
| ------------------ | --- |


# POWER

The POWER function returns the result of a number raised to a power.

### Syntax

POW(value, power) - > number

### Arguments

<table><thead><tr><th width="159.95660036166367">Arguments</th><th width="161">Datatype</th><th width="379">Description</th></tr></thead><tbody><tr><td>value</td><td>Number, Node reference</td><td>The base number, it can be any real number or node.</td></tr><tr><td>power</td><td>Number</td><td> The exponent to which the value is raised.</td></tr></tbody></table>

### Example&#x20;

Consider a below example with $16,000 loan at an annual rate of 5% that is to be paid off in 6 years. Calculate Compound Interest.

<table><thead><tr><th width="266.6008583690987">Items</th><th width="146" align="center">Values</th></tr></thead><tbody><tr><td><mark style="color:purple;">Principal</mark></td><td align="center">16000</td></tr><tr><td><mark style="color:orange;">Rate</mark></td><td align="center">0.05</td></tr><tr><td><mark style="color:red;">Time</mark></td><td align="center">6</td></tr><tr><td><mark style="color:green;">Monthly Compound</mark></td><td align="center">12</td></tr></tbody></table>

To calculate the Compound Interest, the formula should be written in the \[Compound Interest] node.

<mark style="color:purple;">**`[Principal]`**</mark>**`(`**<mark style="color:blue;">**`POWER`**</mark>**`(1+(`**<mark style="color:orange;">**`[Rate]`**</mark>**`/`**<mark style="color:green;">**`[Monthly Compound]`**</mark>**`),(`**<mark style="color:red;">**`[Time]`**</mark>**`*`**<mark style="color:green;">**`[Monthly Compound]`**</mark>**`)))`**

### Result

| **Compound Interest** | 21584.28391 |
| --------------------- | ----------- |


# SQRT

The SQRT function returns the square root of a number.

### Syntax

SQRT(value) - > number

### Arguments

<table><thead><tr><th width="134.79245283018867">Arguments</th><th width="148">Datatype</th><th width="415">Description</th></tr></thead><tbody><tr><td>value</td><td>Number, Node reference</td><td>The number or node for which you want the square root of.</td></tr></tbody></table>

### Example

Consider an example where a node has the following values. Calculate the square root of these Values.&#x20;

<table data-header-hidden><thead><tr><th width="112">Column1</th><th width="55">Column2</th><th width="51">Column3</th><th width="62">Column4</th><th width="66">Column5</th><th width="71">Column6</th></tr></thead><tbody><tr><td><mark style="color:purple;">Number</mark></td><td>25</td><td>81</td><td>169</td><td>289</td><td>49</td></tr></tbody></table>

To calculate the Square Root, the following formula should be written in the \[Square root] node:

<mark style="color:blue;">**`SQRT`**</mark>**`(`**<mark style="color:purple;">**`[Number]`**</mark>**`)`**

### Result

| Square root |  5  |  9  |  13 |  17 |  7  |
| ----------- | :-: | :-: | :-: | :-: | :-: |


# EXP

The EXP function returns e raised to the power of a given number. This is the reverse of ln, the natural logarithm of number.

### Syntax

EXP(value) - > number

### Arguments

<table><thead><tr><th width="139.33333333333331">Arguments</th><th width="238">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>value</td><td>Number, Node reference</td><td>The exponent applied to the base e. This is a required argument.</td></tr></tbody></table>

### Example&#x20;

Consider a scenario where we have the 2020 population figures of 5 major cities. Our goal is to estimate the population in the year 2030 assuming an average growth rate of 2%.

<table data-header-hidden><thead><tr><th width="132"></th><th></th><th></th><th></th><th></th><th></th></tr></thead><tbody><tr><td>City</td><td>New York</td><td>London </td><td>Hongkong</td><td>Toronto</td><td>Los Angeles</td></tr><tr><td>2020 population</td><td>8804190</td><td>9002488</td><td>7960000</td><td>3998747</td><td>6197000</td></tr><tr><td>Growth rate</td><td>0.02</td><td>0.02</td><td>0.02</td><td>0.02</td><td>0.02</td></tr><tr><td>Duration</td><td>10</td><td>10</td><td>10</td><td>10</td><td>10</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[2030 population] node:

**`[2020 population]*`**<mark style="color:blue;">**`EXP`**</mark>***`([`*****`Growth rate]*[Duration])`**

### Result

| 2030 population |
| --------------- |
| 10753461.95     |
| 10995663.67     |
| 9722365.955     |
| 4884080.615     |
| 7569032.892     |


# LOG

The LOG function returns the logarithm of a number to the base you specify.

### Syntax

LOG(value, base) - > number

### Arguments

<table><thead><tr><th width="178.33333333333331">Arguments</th><th width="213">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>value</td><td>Number, Node reference</td><td>The positive real number for which you want to derive the logarithm.</td></tr><tr><td>base</td><td>Number, Node reference</td><td>The base of the logarithm.</td></tr></tbody></table>

### Example

Consider the below scenario where we have values and base for four periods. The objective is to derive the LOG of those values.

<table><thead><tr><th width="136">Period</th><th width="118" align="center">1</th><th width="117" align="center">2</th><th width="125" align="center">3</th><th align="center">4</th></tr></thead><tbody><tr><td><mark style="color:purple;">value</mark></td><td align="center">30</td><td align="center">40</td><td align="center">35</td><td align="center">50</td></tr><tr><td><mark style="color:orange;">base</mark></td><td align="center">5</td><td align="center">4</td><td align="center">3</td><td align="center">6</td></tr></tbody></table>

&#x20;To achieve this, the following formula should be written in the \[LOG] node:

<mark style="color:blue;">**`LOG`**</mark>**`(`**<mark style="color:purple;">**`[value]`**</mark>**` ``,`` `**<mark style="color:orange;">**`[base]`**</mark>**`)`**

### Result

| LOG | 2.113282753 | 2.660964 | 3.2362173 | 2.1833416 |
| --- | ----------- | -------- | --------- | --------- |


# ROUND

The ROUND function calculates rounded value of the specified number or node.

### Syntax

ROUND(value) - > number

### Arguments

<table><thead><tr><th width="159">Arguments</th><th width="148">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>value</td><td>Number/Node reference</td><td>This is the number or node values which you want to round off. This is a required argument.</td></tr></tbody></table>

### Remarks

If the decimal value is less than 5, it will round down and if it is 5 or more it will round up.

### Example

Consider this example.

<table><thead><tr><th width="84"></th><th width="131">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td><mark style="color:purple;">Sales</mark></td><td>69700.64</td><td>72700</td><td>76500.93</td><td>70200.69</td><td>71500.72</td><td>83900.54</td><td>70000.721</td><td>69500.43</td><td>74200.94</td><td>67700.38</td><td>78450.82</td><td>68950.43</td></tr><tr><td><mark style="color:orange;">Cost of Sales</mark></td><td>43400.36</td><td>44300.68</td><td>46700.93</td><td>45300.25</td><td>43600.54</td><td>46900.39</td><td>44200.452</td><td>42800.81</td><td>45900.18</td><td>43800.06</td><td>47200.67</td><td>41000.32</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[Gross Profit] node

<mark style="color:blue;">**`ROUND`**</mark>**`(`**<mark style="color:blue;">**`SUBTRACT`**</mark>**`(`**<mark style="color:purple;">**`[Sales]`**</mark>**`,`**<mark style="color:orange;">**`[Cost of Sales]`**</mark>**`))`**

### **Result**

<table><thead><tr><th width="84"></th><th width="131">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td>Gross Profit</td><td>26300</td><td>28399</td><td>29800</td><td>24900</td><td>27900</td><td>37000</td><td>25800</td><td>26700</td><td>28301</td><td>23900</td><td>31250</td><td>27950</td></tr></tbody></table>


# FLOOR

The FLOOR function returns the rounded down value of the specified number or node.

### Syntax

FLOOR(value) - > number

### Arguments

<table><thead><tr><th width="159">Arguments</th><th width="148">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>value</td><td>Number/Node reference</td><td>The value or the node name that has the values to be rounded down.</td></tr></tbody></table>

### Example

In the below example Sales target to achieve is 2200 and employee sales are given. Employees will receive 2% incentive of sale price for sales made more than the target. The sales price of a product is 1254. We need to calculate the incentive received by employee.

<table><thead><tr><th width="159"></th><th width="144">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td><mark style="color:purple;">Sales Target</mark></td><td>2200</td><td>2200</td><td>2200</td><td>2200</td><td>2200</td><td>2200</td><td>2200</td><td>2200</td><td>2200</td><td>2200</td><td>2200</td><td>2200</td></tr><tr><td><mark style="color:orange;">Employee Sales</mark></td><td>1850</td><td>2134</td><td>2489</td><td>1783</td><td>1965</td><td>2498</td><td>1934</td><td>2356</td><td>2793</td><td>3120</td><td>1897</td><td>2185</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[Incentive] node

<mark style="color:blue;">**`FLOOR`**</mark>**`(`**<mark style="color:blue;">**`IF`**</mark>**`((`**<mark style="color:orange;">**`[Employee Sales]`**</mark>**`>`**<mark style="color:purple;">**`[Sales Target]`**</mark>**`),(`**<mark style="color:orange;">**`[Employee Sales]`**</mark>**`-`**<mark style="color:purple;">**`[Sales Target]`**</mark>**`),0) * 1254 * 0.02)`**

### **Result**

<table><thead><tr><th width="159"></th><th width="144">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td>Incentive</td><td>0</td><td>0</td><td>7248</td><td>0</td><td>0</td><td>7473</td><td>0</td><td>3912</td><td>14872</td><td>23073</td><td>0</td><td>0</td></tr></tbody></table>

### Remarks

Without using FLOOR, the result would be:

<table><thead><tr><th width="159"></th><th width="144">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td>Incentive</td><td>0</td><td>0</td><td>7248.12</td><td>0</td><td>0</td><td>7473.84</td><td>0</td><td>3912.48</td><td>14872.44</td><td>23073.6</td><td>0</td><td>0</td></tr></tbody></table>


# CEILING

The CEILING function returns the rounded up value of the specified number or node.

### Syntax

CEIL(value) - > number

### Arguments

<table><thead><tr><th width="159">Arguments</th><th width="148">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>value</td><td>Number/Node reference</td><td>The value or the node name that has the values to be rounded up.</td></tr></tbody></table>

### Example

Consider the below example where we have raw material consumption data. The objective is to find out the number of boxes of raw material that we have consumed.

<table><thead><tr><th width="318.4339963833635">Periods</th><th width="93">Jan</th><th width="92">Feb</th><th width="84">Mar</th></tr></thead><tbody><tr><td><mark style="color:green;">Raw material available per box</mark></td><td>2</td><td>2</td><td>2</td></tr><tr><td><mark style="color:orange;">Raw material used per box</mark> </td><td>1.25</td><td>1.25</td><td>1.25</td></tr><tr><td><mark style="color:purple;">Demand</mark></td><td>20</td><td>25</td><td>30</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[No. of raw material boxes used] node.

<mark style="color:blue;">**`CEIL`**</mark>**`((`**<mark style="color:blue;">**`PRODUCT`**</mark>**`(`**<mark style="color:purple;">**`[Demand]`**</mark>**`,`**<mark style="color:orange;">**`[Raw material used per box]`**</mark>**`))/`**<mark style="color:green;">**`[Raw material available per box]`**</mark>**`)`**

### **Result**

| Periods                        | Jan   | Feb   | Mar   |
| ------------------------------ | ----- | ----- | ----- |
| No. of raw material boxes used | 13.00 | 16.00 | 19.00 |

### Remarks

Without using CEIL, the results would be:

| Periods                        | Jan   | Feb    | Mar   |
| ------------------------------ | ----- | ------ | ----- |
| No. of raw material boxes used | 12.50 | 15.625 | 18.75 |


# Finance Functions

<table><thead><tr><th width="136">NAME</th><th>SYNTAX</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><a href="/pages/PvbtorjGrOjHKZlqlldM">IRR</a></td><td>IRR (Values, Guess?) - > number</td><td>Returns the internal rate of return for a series of cash flows. Node references are also accepted as arguments</td></tr><tr><td><a href="/pages/LKmj4prnYpuufwTvk9uw">NPV</a></td><td>NPV (Rate, value1, valueN?) - > number</td><td>Returns the net present value of an investment based on a discount rate and a series of future payments (negative values) and income (positive values)</td></tr><tr><td><a href="/pages/6A6hAzADCFE2SqAQL4kr">PMT</a></td><td>PMT(Rate, Nper, PV, FV?, Type?) - > number</td><td>Calculates the payment for a loan based on constant payments and a constant interest rate</td></tr><tr><td><a href="/pages/BU7IKXA2ovrYWSJEsmia">IPMT</a></td><td>IPMT (Rate, Per, Nper, PV, FV?,Type?) - > number</td><td>Returns the interest payment for a given period for an investment, based on periodic, constant payments and a constant interest rate</td></tr><tr><td><a href="/pages/pqUdKscpeQ6oAEbPtTEq">FV</a></td><td>FV(Rate, Nper,Pmt?, PV,Type?) - > number</td><td>Returns the future value of an investment based on periodic, constant payments and a constant interest rate</td></tr><tr><td><a href="/pages/iEnuNJaiagfFYd6jeC3V">PV</a></td><td>PV(Rate,Nper,Pmt?,FV,Type?) - > number</td><td>Returns the present value of an investment</td></tr><tr><td><a href="/pages/OCr3PuGWkfz3AYhsm9CL">CUMIPMT</a></td><td>CUMIPMT (Rate, Nper, PV, start_period, end_period, Type) - > number</td><td>Returns the cumulative interest paid between two periods</td></tr><tr><td><a href="/pages/qSukzHye5DhHIWpL9Kds">CUMPRINC</a></td><td>CUMPRINC (Rate, Nper, PV, start_period, end_period, Type) - > number</td><td>Returns the cumulative principal paid on a loan between two periods</td></tr><tr><td><a href="/pages/Sx0VVlecFh5qH7AHxk7C">RATE</a></td><td>RATE(Nper, PMT, PV?,FV?,Type?,Guess?) - > number</td><td>Returns the interest rate per period of a loan or an investment.</td></tr></tbody></table>


# IRR

The IRR function returns the internal rate of return for a series of positive and negative cash flows. Node references are also accepted as arguments.

### Syntax

IRR (values,Guess?) - > Number&#x20;

### Arguments

<table><thead><tr><th width="151">Arguments</th><th width="193">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>values</td><td>Number, node reference</td><td>The node that contains the cash outflow and inflows for which you want to calculate the IRR. This is a required argument.</td></tr><tr><td>Guess?</td><td>Number    </td><td>A value that you guess is closest to the actual IRR value. This is an optional argument.</td></tr></tbody></table>

### Remarks

The argument should contain at least one positive and one negative value.

### Example

Consider the below example of a project with an initial investment of $10,000 and cash inflows of $4,000 for the subsequent four years. The objective is to evaluate the project by calculating IRR.

<table><thead><tr><th width="133">Periods</th><th align="right">0</th><th align="right">1</th><th align="right">2</th><th align="right">3</th><th align="right">4</th></tr></thead><tbody><tr><td><mark style="color:purple;">Initial Investment</mark></td><td align="right">-10000</td><td align="right">-</td><td align="right">-</td><td align="right">-</td><td align="right">-</td></tr><tr><td><mark style="color:green;">Cash Inflows</mark></td><td align="right">-</td><td align="right">4000</td><td align="right">4000</td><td align="right">4000</td><td align="right">4000</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[IRR] node:

<mark style="color:blue;">**`IRR`**</mark>**`(`**<mark style="color:purple;">**`[Initial Investment]`**</mark>**`,`**<mark style="color:green;">**`[Cash Inflows]`**</mark>**`.`**<mark style="color:blue;">**`ALL_PERIODS`**</mark>**`)`**

We are including[ .ALL\_PERIODS](https://docs.valq.com/model/formula-functions/finance-functions/pages/bd9R41FrVkmuCJPGQLmc#node-.all_periods) in the formula so that it takes the value of the entire year's cash inflow rather a single period.

### Result

<table data-header-hidden><thead><tr><th width="200.69230769230768" align="center">Column1</th><th width="155" align="center">Column2</th></tr></thead><tbody><tr><td align="center">IRR</td><td align="center">21.86%</td></tr></tbody></table>


# NPV

The NPV function returns the net present value of an investment based on a discount rate and a series of future payments (negative values) and income (positive values).

### Syntax

NPV (Rate, value1,...valueN?) - > Number

### Arguments

<table><thead><tr><th width="148.33333333333331">Arguments</th><th width="224">Datatype</th><th>Description </th></tr></thead><tbody><tr><td>Rate</td><td>Number</td><td>The rate of discount </td></tr><tr><td>value1</td><td>Number, Node reference</td><td>The node that contains the order of cash flows for which you want to calculate the NPV. This is a required argument.</td></tr><tr><td>valueN?</td><td>Number, Node reference</td><td>The additional nodes that contains the order of cash flows for which you want to calculate the NPV. This is an optional argument </td></tr></tbody></table>

### Example

Consider the below example of a project with an initial investment of $10,000 and cash inflows of $4,000 for the subsequent four years. Discount rate is 12%. The objective is to evaluate the project by calculating NPV.

<table><thead><tr><th width="133">Periods</th><th align="right">0</th><th align="right">1</th><th align="right">2</th><th align="right">3</th><th align="right">4</th></tr></thead><tbody><tr><td><mark style="color:purple;">Initial Investment</mark></td><td align="right">-10000</td><td align="right">-</td><td align="right">-</td><td align="right">-</td><td align="right">-</td></tr><tr><td><mark style="color:green;">Cash Inflows</mark></td><td align="right">-</td><td align="right">4000</td><td align="right">4000</td><td align="right">4000</td><td align="right">4000</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[NPV] node:

<mark style="color:blue;">**`NPV`**</mark>**`(12% ,`**<mark style="color:green;">**`[Cash Inflows]`**</mark>**`.`**<mark style="color:blue;">**`ALL_PERIODS`**</mark>**`)+`**<mark style="color:purple;">**`[Initial Investment]`**</mark>

We are including .ALL\_PERIODS in the formula so that it takes the value of the entire year's cash inflow rather a single period.

### Result

| NPV | 2149.40 |
| --- | ------- |


# PMT

The PMT function calculates the payments for a loan based on constant payments and a constant interest rate.

### Syntax

PMT(Rate,Nper,PV,FV?,Type?) - > Number&#x20;

### Arguments

<table><thead><tr><th width="145">Arguments</th><th width="194">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>Rate</td><td>Number, Node reference</td><td>The interest rate per period.</td></tr><tr><td>Nper</td><td>Number, Node reference</td><td>The total number of periods.</td></tr><tr><td>PV</td><td>Node reference</td><td>The present value or initial investment. Cash outflows are considered as negative and cash inflows as positive.</td></tr><tr><td>FV?</td><td>Node reference</td><td>The future or residual value. This is an optional argument and if omitted, it is considered to be zero.</td></tr><tr><td>Type?</td><td>Number </td><td>Indicates when the payments are made. Type is zero if payments are made at the end of the period and non-zero if payments are made at the start of the period. This is an optional argument and when omitted, it is considered to be zero.</td></tr></tbody></table>

### Example

Consider a $10,000 loan at an annual rate of 10% that is to be paid off in 1.5 years. All payments are made at the beginning of the month.

<table><thead><tr><th width="88">Periods</th><th width="133">1</th><th width="73">2</th><th width="82">3</th><th width="73">4</th><th width="77">5</th><th width="75">6</th><th width="77">7</th><th width="73">8</th><th width="75">9</th><th width="81">10</th><th width="77">11</th><th width="73">12</th><th width="75">13</th><th width="77">14</th><th width="79">15</th><th width="77">16</th><th width="77">17</th><th width="79">18</th></tr></thead><tbody><tr><td>Periodic Rate</td><td>0.83%</td><td>0.83%</td><td>0.83%</td><td>0.83%</td><td>0.83%</td><td>0.83%</td><td>0.83%</td><td>0.83%</td><td>0.83%</td><td>0.83%</td><td>0.83%</td><td>0.83%</td><td>0.83%</td><td>0.83%</td><td>0.83%</td><td>0.83%</td><td>0.83%</td><td>0.83%</td></tr><tr><td><mark style="color:purple;">Number of periods</mark></td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td></tr><tr><td><mark style="color:orange;">Loan Amount</mark></td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td></tr><tr><td>Type</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr></tbody></table>

To calculate the monthly payments that are to be made, the formula should be written in the \[PMT] node:

<mark style="color:blue;">**`PMT`**</mark>**`( 0.83% ,`**<mark style="color:purple;">**`[Number of periods]`**</mark>**`,`**<mark style="color:orange;">**`[Loan Amount]`**</mark>**`,0,1)`**

We are dividing the annual rate by 12 to get the period rate.

### Result

**Monthly Payments**

<table data-header-hidden><thead><tr><th width="88">Column1</th><th width="134">Column2</th><th width="75">Column3</th><th width="82">Column4</th><th width="75">Column5</th><th width="77">Column6</th><th width="75">Column7</th><th width="79">Column8</th><th width="75">Column9</th><th width="83">Column10</th><th width="83">Column11</th><th width="83">Column12</th><th width="83">Column13</th><th width="83">Column14</th><th width="83">Column15</th><th width="83">Column16</th><th width="83">Column17</th><th width="83">Column18</th><th width="83">Column19</th></tr></thead><tbody><tr><td>PMT</td><td>₹ -595.61</td><td>₹ -595.61</td><td>₹ -595.61</td><td>₹ -595.61</td><td>₹ -595.61</td><td>₹ -595.61</td><td>₹ -595.61</td><td>₹ -595.61</td><td>₹ -595.61</td><td>₹ -595.61</td><td>₹ -595.61</td><td>₹ -595.61</td><td>₹ -595.61</td><td>₹ -595.61</td><td>₹ -595.61</td><td>₹ -595.61</td><td>₹ -595.61</td><td>₹ -595.61</td></tr></tbody></table>


# IPMT

The IPMT function calculates the amount of interest to be paid on a loan where the interest payments and timing of payments are consistent.

### Syntax

IPMT(Rate, Per, Nper, PV,FV?,Type?) - > Number&#x20;

### Arguments

<table><thead><tr><th width="141.33333333333331">Arguments</th><th width="197">Datatype</th><th>Description </th></tr></thead><tbody><tr><td>Rate</td><td>Number</td><td>The interest rate per period</td></tr><tr><td>Per</td><td>Number</td><td>The period for which you want to find the interest. It must be in the range of 1 and the total number of periods.</td></tr><tr><td>Nper </td><td>Number</td><td>The total number of periods</td></tr><tr><td>PV</td><td>Number, Node name</td><td>The present value or initial investment. Cash outflows are considered as negative and cash inflows are positive.</td></tr><tr><td>FV?</td><td>Number, Node name</td><td>The future or residual value. This is an optional argument and if omitted, it is considered to be zero</td></tr><tr><td>Type?</td><td>Number</td><td>Indicates when the payments are made. Type is zero if payments are made at the end of the period and 1 if the payments are made at the start of the period.</td></tr></tbody></table>

### Example

Consider a $10,000 loan at an annual rate of 10% that is to be paid off in 1.5 years. All payments are made at the beginning of the month.

<table><thead><tr><th width="209">Periods</th><th width="137">1</th><th width="141">2</th><th width="135">3</th><th width="131">4</th><th width="64">5</th><th width="64">6</th><th width="64">7</th><th width="64">8</th><th width="64">9</th><th width="64">10</th><th width="64">11</th><th width="64">12</th><th width="64">13</th><th width="64">14</th><th width="64">15</th><th width="64">16</th><th width="64">17</th><th width="64">18</th></tr></thead><tbody><tr><td><mark style="color:purple;">Number of periods</mark></td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td></tr><tr><td><mark style="color:orange;">Loan Amount</mark></td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td></tr><tr><td>Type</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr><tr><td><mark style="color:red;">Period</mark></td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td><td>13</td><td>14</td><td>15</td><td>16</td><td>17</td><td>18</td></tr><tr><td><mark style="color:green;">Rate</mark></td><td>10%</td><td>10%</td><td>10%</td><td>10%</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>

To calculate the interest payments the following formula should be written in the IPMT node:

<mark style="color:blue;">**`IPMT`**</mark>**`(`**<mark style="color:green;">**`[Rate]`**</mark>**`/12,`` `**<mark style="color:red;">**`[Period]`**</mark>**`,`` `**<mark style="color:purple;">**`[Number of periods]`**</mark>**`,`` `**<mark style="color:orange;">**`[Loan Amount]`**</mark>**`,0,1)`**

### Result

<table data-header-hidden><thead><tr><th width="119">Column1</th><th width="137">Column2</th><th width="75">Column3</th><th width="75">Column4</th><th width="75">Column5</th><th width="75">Column6</th><th width="75">Column7</th><th width="75">Column8</th><th width="75">Column9</th><th width="83">Column10</th><th width="83">Column11</th><th width="83">Column12</th><th width="83">Column13</th><th width="83">Column14</th><th width="83">Column15</th><th width="83">Column16</th><th width="83">Column17</th><th width="83">Column18</th><th width="83">Column19</th></tr></thead><tbody><tr><td>IPMT</td><td>₹ 0.00</td><td>₹ -78.37</td><td>₹ -74.06</td><td>₹ -69.71</td><td>₹ -65.33</td><td>₹ -60.91</td><td>₹ -56.46</td><td>₹ -51.96</td><td>₹ -47.43</td><td>₹ -42.86</td><td>₹ -38.26</td><td>₹ -33.61</td><td>₹ -28.93</td><td>₹ -24.21</td><td>₹ -19.45</td><td>₹ -14.65</td><td>₹ -9.80</td><td>₹ -4.92</td></tr></tbody></table>

The interest payments for Period 1 is 0 as the payment is made at beginning of the month. Note the decrease in interest amount as the principal amount will be repaid gradually.


# FV

The FV function returns the future value of an investment based on periodic constant payments and a constant interest rate. The future value is the closing amount that you will receive/pay at the end of the period.

### Syntax

FV(Rate, Nper, Pmt?, PV, Type?) - > Number&#x20;

### Arguments

<table><thead><tr><th width="139.33333333333331">Arguments 		</th><th width="204">Datatype</th><th>Description 														</th></tr></thead><tbody><tr><td>Rate</td><td>Number, Node reference</td><td>The interest rate per period</td></tr><tr><td>Nper</td><td>Number </td><td>The total number of periods</td></tr><tr><td>Pmt?</td><td>Number, Node reference</td><td>Equal payments paid out each period during the course of the investment term. This is an optional argument.</td></tr><tr><td>PV</td><td>Number, Node reference</td><td>The present value or initial investment. Cash outflows should be negative and cash inflows should be positive.</td></tr><tr><td>Type?</td><td>Number</td><td>Indicates when the payments are made. Type is 0 if the payments are made at the end of the period and 1 if payments are made at the start of the period.</td></tr></tbody></table>

### Example

Consider a series of $2000 payments made at the end of each year for 6 years for an investment. The objective is to calculate the future value at the end of 6 years where the interest rate is 5%.

<table><thead><tr><th width="126">Period</th><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th></tr></thead><tbody><tr><td><mark style="color:purple;">Payment</mark></td><td>2000</td><td>2000</td><td>2000</td><td>2000</td><td>2000</td><td>2000</td></tr><tr><td><mark style="color:orange;">Interest Rate</mark></td><td>5%</td><td>5%</td><td>5%</td><td>5%</td><td>5%</td><td>5%</td></tr><tr><td><mark style="color:red;">Number of periods</mark></td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td></tr></tbody></table>

To calculate the future value, the following formula should be entered in the \[FV] node:

<mark style="color:blue;">**`FV`**</mark>**`(`**<mark style="color:orange;">**`[Interest Rate]`**</mark>**`,`**<mark style="color:red;">**`[Number of Periods]`**</mark>**`,`**<mark style="color:purple;">**`[Payment]`**</mark>**`,0,0)`**

### Result

<table data-header-hidden><thead><tr><th width="74">Column1</th><th width="111">Column2</th><th width="107">Column3</th><th width="110">Column4</th><th width="111">Column5</th><th width="114">Column6</th><th>Column7</th></tr></thead><tbody><tr><td>FV  </td><td>$2,000.00</td><td>$4,100.00</td><td>$6,305.00</td><td>$8,620.25</td><td>$11,051.26</td><td>$13,603.83</td></tr></tbody></table>

The value of $2000 keeps increasing at the end of each year by the interest rate of 5% giving a value of 13603.83 by the end of 6 years.


# PV

The PV function returns the present value of an investment based on periodic, constant payments and a constant interest rate.

### Syntax

PV (Rate, Nper, Pmt?, FV, Type?) - > Number

### Arguments

<table><thead><tr><th width="140">Arguments</th><th width="207">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>Rate</td><td>Number, Node reference</td><td>The interest rate per period.</td></tr><tr><td>Nper</td><td>Number </td><td>The total number of periods.</td></tr><tr><td>Pmt?</td><td>Number, Node reference</td><td>Equal payments paid out each period during the course of the investment term. This is an optional argument.</td></tr><tr><td>FV</td><td>Number</td><td>The future value of investment. Cash outflows are considered as negative and cash inflows as positive.</td></tr><tr><td>Type?</td><td>Number</td><td>Indicates when the payments are made. Type is zero if payments are made at the end of the period and non-zero if payments are made at the start of the period. This is an optional argument and when omitted, it is considered to be zero.</td></tr></tbody></table>

### Example

Consider a Loan of $20000 for which interest payments are made at the end of each year for 6 years. The objective is to calculate the present value where the interest rate is 7%.

<table><thead><tr><th width="114">Year</th><th width="134">1</th><th width="106">2</th><th width="99">3</th><th width="94">4</th><th width="99">5</th><th width="103">6</th></tr></thead><tbody><tr><td><mark style="color:purple;">Interest Rate</mark></td><td>7%</td><td>7%</td><td>7%</td><td>7%</td><td>7%</td><td>7%</td></tr><tr><td><mark style="color:red;">Number of periods</mark></td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td></tr><tr><td><mark style="color:green;">Payments Made</mark></td><td>1400</td><td>1400</td><td>1400</td><td>1400</td><td>1400</td><td>1400</td></tr><tr><td>Type</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[Present Value] node:

<mark style="color:blue;">**`PV`**</mark>**` ``(`**<mark style="color:purple;">**`[Interest Rate]`**</mark>**`,`` `**<mark style="color:red;">**`[Number of Periods]`**</mark>**`,`` `**<mark style="color:green;">**`[Payments Made]`**</mark>**`,0,0)`**

### Result

<table data-header-hidden><thead><tr><th width="108">Column1</th><th align="center">Column2</th><th align="center">Column3</th><th align="center">Column4</th><th align="center">Column5</th><th align="center">Column6</th><th align="center">Column7</th></tr></thead><tbody><tr><td>Present Value</td><td align="center">₹ -1,308.41</td><td align="center">₹ -2,531.23</td><td align="center">₹ -3,674.04</td><td align="center">₹ -4,742.10</td><td align="center">₹ -5,740.28</td><td align="center">₹ -6,673.16</td></tr></tbody></table>


# CUMIPMT

The CUMIPMT function returns the cumulative interest paid between two periods.

### Syntax

CUMIPMT (Rate, Nper, PV, start\_period, end\_period, Type) - > Number&#x20;

### Arguments

<table><thead><tr><th width="159">Arguments</th><th width="147">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>Rate</td><td>Number, Node reference</td><td>The interest rate per period.</td></tr><tr><td>Nper</td><td>Number</td><td>The total number of periods.</td></tr><tr><td>PV</td><td>Number</td><td>The present value of the loan.</td></tr><tr><td>start_period</td><td>Number</td><td>The first payment period.</td></tr><tr><td>end_period</td><td>Number</td><td>The last payment period.</td></tr><tr><td>Type</td><td>Number</td><td>Indicates when the payments are made. Type is zero if payments are made at the end of the period and non-zero if payments are made at the start of the period.</td></tr></tbody></table>

### Example

Consider a $10,000 loan at an annual rate of 10% that is to be paid off in 1.5 years. All payments are made at the beginning of the month. Calculate Cumulative Interest Payments for all periods.

<table><thead><tr><th width="193">Periods</th><th width="81">1</th><th width="64">2</th><th width="64">3</th><th width="64">4</th><th width="64">5</th><th width="64">6</th><th width="64">7</th><th width="64">8</th><th width="64">9</th><th width="64">10</th><th width="64">11</th><th width="64">12</th><th width="64">13</th><th width="64">14</th><th width="64">15</th><th width="64">16</th><th width="64">17</th><th width="64">18</th></tr></thead><tbody><tr><td><mark style="color:purple;">Rate</mark></td><td>10%</td><td>10%</td><td>10%</td><td>10%</td><td>10%</td><td>10%</td><td>10%</td><td>10%</td><td>10%</td><td>10%</td><td>10%</td><td>10%</td><td>10%</td><td>10%</td><td>10%</td><td>10%</td><td>10%</td><td>10%</td></tr><tr><td><mark style="color:orange;">Number of Years</mark></td><td>1.5</td><td>1.5</td><td>1.5</td><td>1.5</td><td>1.5</td><td>1.5</td><td>1.5</td><td>1.5</td><td>1.5</td><td>1.5</td><td>1.5</td><td>1.5</td><td>1.5</td><td>1.5</td><td>1.5</td><td>1.5</td><td>1.5</td><td>1.5</td></tr><tr><td><mark style="color:red;">Loan Amount</mark></td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td></tr><tr><td>Start Period</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr><tr><td><mark style="color:green;">End Period</mark></td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td><td>13</td><td>14</td><td>15</td><td>16</td><td>17</td><td>18</td></tr><tr><td>Payments Type</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[Cumulative Interest Payments] node:

<mark style="color:blue;">**`CUMIPMT`**</mark>**` ``(`**<mark style="color:purple;">**`[Rate]`**</mark>**`/12,`**<mark style="color:orange;">**`[Number of Years]`**</mark>**`*12,`**<mark style="color:red;">**`[Loan Amount]`**</mark>**`,1,`**<mark style="color:green;">**`[End Period]`**</mark>**`,1)`**

### Result

<table data-header-hidden><thead><tr><th width="193">Column1</th><th width="81">Column2</th><th width="71">Column3</th><th width="71">Column4</th><th width="71">Column5</th><th width="71">Column6</th><th width="71">Column7</th><th width="71">Column8</th><th width="71">Column9</th><th width="77">Column10</th><th width="77">Column11</th><th width="77">Column12</th><th width="77">Column13</th><th width="77">Column14</th><th width="77">Column15</th><th width="77">Column16</th><th width="77">Column17</th><th width="77">Column18</th><th width="77">Column19</th></tr></thead><tbody><tr><td>Cumulative Interest Payments</td><td>0</td><td>-78.369938</td><td>-152.42956</td><td>-222.14296</td><td>-287.4739</td><td>-348.38588</td><td>-404.84206</td><td>-456.80531</td><td>-504.238192</td><td>-547.102955</td><td>-585.361529</td><td>-618.97553</td><td>-647.906252</td><td>-672.114668</td><td>-691.561427</td><td>-706.206846</td><td>-716.010916</td><td>-720.933291</td></tr></tbody></table>


# CUMPRINC

The CUMPRINC function returns cumulative principal paid on a loan between two periods.

### Syntax

CUMPRINC (Rate, Nper, PV, start\_period, end\_period, Type) - > Number&#x20;

### Arguments

<table><thead><tr><th width="141">Arguments</th><th width="138">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>Rate</td><td>Number, Rate</td><td>The interest rate per period.</td></tr><tr><td>Nper</td><td>Number</td><td>The total number of periods.</td></tr><tr><td>PV</td><td>Number</td><td>The present value of the loan.</td></tr><tr><td>start_period</td><td>Number</td><td>The first payment period.</td></tr><tr><td>end_period</td><td>Number</td><td>The last payment period.</td></tr><tr><td>Type</td><td>Number</td><td>Indicates when the payments are made. Type is zero if payments are made at the end of the period and non-zero if payments are made at the start of the period.</td></tr></tbody></table>

### Example

Consider a $10,000 loan at an annual rate of 10% that is to be paid off in 1.5 years. All payments are made at the beginning of the month. Calculate cumulative principal payments for all the periods.

<table><thead><tr><th width="202">Periods</th><th width="89">1</th><th width="64">2</th><th width="64">3</th><th width="64">4</th><th width="64">5</th><th width="64">6</th><th width="64">7</th><th width="64">8</th><th width="64">9</th><th width="64">10</th><th width="64">11</th><th width="64">12</th><th width="64">13</th><th width="64">14</th><th width="64">15</th><th width="64">16</th><th width="64">17</th><th width="64">18</th></tr></thead><tbody><tr><td><mark style="color:purple;">Nper</mark></td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td><td>18</td></tr><tr><td><mark style="color:red;">Loan Amount</mark></td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td><td>10000</td></tr><tr><td>Start Period</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr><tr><td><mark style="color:green;">End Period</mark></td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td><td>13</td><td>14</td><td>15</td><td>16</td><td>17</td><td>18</td></tr><tr><td>Payments Type</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr></tbody></table>

To calculate the principal payment for all periods, the formula should be written in the \[Cumulative Principal Payments] node:

<mark style="color:blue;">**`CUMPRINC`**</mark>**`(10%/12,`**<mark style="color:purple;">**`[Nper]`**</mark>**`,`**<mark style="color:red;">**`[Loan Amount]`**</mark>**`,1,`**<mark style="color:green;">**`[End Period]`**</mark>**`,1)`**

### Result

<table data-header-hidden><thead><tr><th width="202">Column1</th><th width="89">Column2</th><th width="75">Column3</th><th width="75">Column4</th><th width="75">Column5</th><th width="75">Column6</th><th width="75">Column7</th><th width="75">Column8</th><th width="75">Column9</th><th width="83">Column10</th><th width="83">Column11</th><th width="83">Column12</th><th width="83">Column13</th><th width="83">Column14</th><th width="83">Column15</th><th width="83">Column16</th><th width="83">Column17</th><th width="83">Column18</th><th width="83">Column19</th></tr></thead><tbody><tr><td>Cumulative Principal Payments</td><td>-595.607405</td><td>-1112.8449</td><td>-1634.3927</td><td>-2160.2867</td><td>-2690.5631</td><td>-3225.2586</td><td>-3764.4098</td><td>-4308.0539</td><td>-4856.22845</td><td>-5408.9711</td><td>-5966.31993</td><td>-6528.31333</td><td>-7094.99001</td><td>-7666.389</td><td>-8242.54965</td><td>-8823.51163</td><td>-9409.31497</td><td>-10000</td></tr></tbody></table>


# RATE

The RATE function returns the interest rate per period of a loan or an investment.

### Syntax

RATE (Nper, PMT, PV?, FV?, Type?, Guess?) - > Number&#x20;

### Arguments

<table><thead><tr><th width="135">Arguments</th><th width="154">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>Nper</td><td>Number</td><td>The total number of periods.</td></tr><tr><td>PMT</td><td>Number/ Node reference </td><td>The payment made each period.</td></tr><tr><td>PV?</td><td>Number/ Node reference</td><td>The total amount that a series of future payments is worth now.</td></tr><tr><td>FV?</td><td>Number/ Node reference</td><td>The future value or a cash balance you want to attain after the last payment is made. This is an optional argument.</td></tr><tr><td>Type?</td><td>Number</td><td>Indicates when the payments are made. Type is zero if payments are made at the end of the period and non-zero if payments are made at the start of the period.</td></tr><tr><td></td><td></td><td></td></tr><tr><td>Guess?</td><td>Number</td><td>Estimate of what the rate will be. This is an optional argument.</td></tr></tbody></table>

### Example

Consider a series of $2000 payments made at the end of each month for 1 year. The objective is to calculate the interest rate per month where the present value is $20,000.

<table><thead><tr><th width="116">Periods</th><th width="84" align="right">0</th><th width="72" align="right">1</th><th width="64" align="right">2</th><th width="64" align="right">3</th><th width="64" align="right">4</th><th width="64" align="right">5</th><th width="64" align="right">6</th><th width="64" align="right">7</th><th width="64" align="right">8</th><th width="64" align="right">9</th><th width="64" align="right">10</th><th width="64" align="right">11</th><th width="64" align="right">12</th></tr></thead><tbody><tr><td><mark style="color:purple;">Present Value</mark></td><td align="right">-20000</td><td align="right">-</td><td align="right">-</td><td align="right">-</td><td align="right">-</td><td align="right">-</td><td align="right">-</td><td align="right">-</td><td align="right">-</td><td align="right">-</td><td align="right">-</td><td align="right">-</td><td align="right">-</td></tr><tr><td><mark style="color:green;">Payments made</mark></td><td align="right">-</td><td align="right">2000</td><td align="right">2000</td><td align="right">2000</td><td align="right">2000</td><td align="right">2000</td><td align="right">2000</td><td align="right">2000</td><td align="right">2000</td><td align="right">2000</td><td align="right">2000</td><td align="right">2000</td><td align="right">2000</td></tr></tbody></table>

To calculate the Interest Rate, the formula should be:

<mark style="color:blue;">**`RATE`**</mark>**`(12,`**<mark style="color:green;">**`[Payments made]`**</mark>**`,`**<mark style="color:purple;">**`[Present Value]`**</mark>**`,0)`**

### Result

The interest rate is calculated to be 2.92%


# Range Functions

<table><thead><tr><th width="230">NAME</th><th width="288">SYNTAX</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><a href="/pages/0BffhsyRGH2KtMm1lgGt">Range</a></td><td>.Range(start_index,end_index)- > number</td><td>Returns the values between the specified start and end periods.</td></tr><tr><td><a href="/pages/fYjm6RnLGJdnebG63D3K">LastNPeriods</a></td><td>.LastNPeriods(n)- > number</td><td>Returns the values of the last 'n' periods</td></tr><tr><td><a href="/pages/N15bi45yzEodn0cz9a3V">Get</a></td><td>.Get(period_index)- > number</td><td>Returns the values of the specified period index</td></tr><tr><td><a href="/pages/ZJ4bncRZbjpntxCcVouL">ForEach</a></td><td>ForEach(Array,Iterator)</td><td>To apply the same operation for multiple nodes.</td></tr><tr><td><a href="/pages/x6izkBa09Sp6ZzTN8SHV">findByTitle</a></td><td>findByTitle(searchString) - > [?]</td><td>Tagging/Grouping function. Returns the value of the nodes which has the specified title</td></tr><tr><td><a href="/pages/nH0Z5x51ADgOvEe6eHRA">GETCURRENTRANGE</a></td><td>DS.(SERIES).GETCURRENTRANGE()</td><td>Returns the current range values based on the period selection.</td></tr><tr><td><a href="/pages/LMjbfSwylJHgoQHLJeNO">GETROWVALUE</a></td><td>DS.(SERIES).GETROWVALUE(sourceKey: string) - > [number]</td><td>Value of source key row</td></tr><tr><td><a href="/pages/q8a8cl4VHYNorniv2QBc">THIS_SOURCE_KEY</a></td><td>DS.(SERIES).THIS_SOURCE_KEY</td><td>Returns the value of the mentioned source key.</td></tr><tr><td><a href="/pages/0Hw8ScTuDKEutHralqd5">PRIOR_SERIES_PERIOD_LOOKUP </a></td><td><p>PRIOR_SERIES_PERIOD_LOOKUP</p><p>(seriesOffset, periodIndex, initialValue) - > [number]</p></td><td>Returns the specified period's value.</td></tr><tr><td><a href="/pages/n7rDGNsd133ENEvyvQf0">PERIOD_LOOKUP</a></td><td>PERIOD_LOOKUP(offset, initialValue) - > [number]</td><td>Returns the specified series's value.</td></tr></tbody></table>


# RANGE

The RANGE function refers to the values of a node between the specified start and end periods. We can use this function to find the values of certain periods.

### Syntax

.RANGE(start\_index, end\_index) - > \[number]

### Arguments

<table><thead><tr><th width="188">Arguments</th><th width="172">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>start_index</td><td>Number</td><td>The starting range/period value</td></tr><tr><td>end_index</td><td>Number</td><td>The ending range/period value</td></tr></tbody></table>

### Remarks

This function can only be used after refering a node for which this calculation needs to be done as shown below in the example.

### Example

Consider a scenario where we have interest payments for months Jan to Dec. Our objective is to calculate the interest paid in the months April to June.

| Periods                                              | Jan | Feb   | Mar   | Apr   | May   | Jun   | Jul   | Aug   | Sep   | Oct   | Nov   | Dec   |
| ---------------------------------------------------- | --- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
| <mark style="color:orange;">Interest payments</mark> | 0   | 78.37 | 74.06 | 69.71 | 65.33 | 60.91 | 56.46 | 51.96 | 47.43 | 42.86 | 38.26 | 33.61 |

To achieve this, the following formula should be written in the \[Range Interest payments] node:

<mark style="color:blue;">**`SUM`**</mark>**`(`**<mark style="color:orange;">**`[Interest payments]`**</mark>**`.`**<mark style="color:blue;">**`Range`**</mark>**`(4,6))`**

### Result

<table data-header-hidden><thead><tr><th width="125">Column1</th><th>Column2</th><th>Column3</th><th>Column4</th><th>Column5</th><th>Column6</th><th>Column7</th><th>Column8</th><th>Column9</th><th>Column10</th><th>Column11</th><th>Column12</th><th>Column13</th></tr></thead><tbody><tr><td>Range Interest payments</td><td>195.95</td><td>195.95</td><td>195.95</td><td>195.95</td><td>195.95</td><td>195.95</td><td>195.95</td><td>195.95</td><td>195.95</td><td>195.95</td><td>195.95</td><td>195.95</td></tr></tbody></table>


# LastNPeriods

The LASTNPERIODS function refers to the values of the node’s last ‘n’ periods. It will give the result as the last 'n' periods' value.

### Syntax

.LASTNPERIODS(n) - > \[number]

### Arguments

<table><thead><tr><th width="146">Arguments</th><th width="124">Datatype</th><th>Description </th></tr></thead><tbody><tr><td>n</td><td>Number</td><td>The integer that is less than the number of periods defined in the model.</td></tr></tbody></table>

### Remarks

This function can only be used after referring a node for which this calculation needs to be done as shown below in the example.

### Example

Consider a scenario where we have interest payments for Jan to Dec. Our objective is to calculate the interest paid in the last 6 months for each month.

<table><thead><tr><th width="159">2022 Periods</th><th>Jan</th><th>Feb</th><th>Mar</th><th>Apr</th><th>May</th><th>Jun</th><th>Jul</th><th>Aug</th><th>Sep</th><th>Oct</th><th>Nov</th><th>Dec</th></tr></thead><tbody><tr><td><mark style="color:orange;">Interest payments</mark></td><td>0</td><td>78.37</td><td>74.06</td><td>69.71</td><td>65.33</td><td>60.91</td><td>56.46</td><td>51.96</td><td>47.43</td><td>42.86</td><td>38.26</td><td>33.61</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[Last 6 period's value] node:

<mark style="color:blue;">**`SUM`**</mark>**`(`**<mark style="color:orange;">**`[Interest payments]`**</mark>**`.`**<mark style="color:blue;">**`LastNPeriods`**</mark>**`(6))`**

We give n as 6 since we want to calculate the last 6 months value. This will calculate the last 6 months value for each period. So for March it will add Jan & Feb, for April it will add Jan to Mar and so on.

### Result

<table data-header-hidden><thead><tr><th width="133">Column1</th><th width="75">Column2</th><th width="75">Column3</th><th width="75">Column4</th><th width="75">Column5</th><th width="75">Column6</th><th width="75">Column7</th><th width="75">Column8</th><th width="75">Column9</th><th width="83">Column10</th><th width="83">Column11</th><th width="83">Column12</th><th width="83">Column13</th></tr></thead><tbody><tr><td>Last 6 period's value</td><td>0</td><td>0</td><td>78.37</td><td>152.43</td><td>222.14</td><td>287.47</td><td>348.38</td><td>404.84</td><td>378.43</td><td>351.8</td><td>324.95</td><td>297.88</td></tr></tbody></table>


# Get

The GET function returns the value of the node corresponding to the period index that is specified.

### Syntax

.GET(period\_index) - > number

### Arguments

<table><thead><tr><th width="158.33333333333331">Arguments</th><th width="142">Datatype</th><th>Description </th></tr></thead><tbody><tr><td>period_index</td><td>Number</td><td>An integer that is less than the number of periods defined in the model.</td></tr></tbody></table>

### Remarks

This function can only be used after referring a node for which this calculation needs to be done as shown below in the example.

### Example

Consider a scenario where you have the Discount rates for each period of 2023. The objective is to take the Dec 2023 rate as the discount rate for all periods of 2024.

<table><thead><tr><th width="103">Periods</th><th width="77">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sept</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td><mark style="color:orange;">Discount (2023)</mark></td><td>10%</td><td>12%</td><td>12%</td><td>11%</td><td>12%</td><td>12%</td><td>13%</td><td>12%</td><td>10%</td><td>11%</td><td>13%</td><td>12%</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[Discount(2024)] node,

<mark style="color:orange;">**`[Discount (2023) ]`**</mark>**`.`**<mark style="color:blue;">**`Get`**</mark>**`(12)`**

### Result

<table><thead><tr><th width="121">Periods</th><th width="77">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sept</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td>Discount (2024)</td><td>12%</td><td>12%</td><td>12%</td><td>12%</td><td>12%</td><td>12%</td><td>12%</td><td>12%</td><td>12%</td><td>12%</td><td>12%</td><td>12%</td></tr></tbody></table>


# ForEach

When we have multiple nodes and want to execute the same operation for each of the node, we will use the ForEach function. It is not applicable for performing operation to a single node.

### Syntax

ForEach (Array,Iterator)

### Arguments

<table><thead><tr><th width="144">Arguments</th><th width="166">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>Array</td><td>Node Name</td><td>The node for which the iterator statement is executed for all the periods.</td></tr><tr><td>Iterator</td><td>This, Children, Parent</td><td>The operation that is to be executed.</td></tr></tbody></table>

### Example

Consider the below scenario where we have Revenue and cost items for different regions. Our objective is to calculate the total costs incurred for marketing.

<table><thead><tr><th width="237">Year</th><th width="121" align="right">2020</th></tr></thead><tbody><tr><td><mark style="color:orange;"><strong>US Marketing (FOREACH)</strong></mark></td><td align="right"><strong>14000</strong></td></tr><tr><td>    <mark style="color:purple;"><strong>New York (Sum children)</strong></mark></td><td align="right"><strong>2510</strong></td></tr><tr><td>       <mark style="color:green;">Men (Subtract Children)</mark></td><td align="right">1000</td></tr><tr><td>          <mark style="color:yellow;">Revenue (Sum Children)</mark></td><td align="right">4500</td></tr><tr><td>               Sales </td><td align="right">4000</td></tr><tr><td>               Receivables</td><td align="right">500</td></tr><tr><td>          <mark style="color:red;">Costs (Sum Children)</mark></td><td align="right">3500</td></tr><tr><td>               <mark style="background-color:green;">Marketing</mark></td><td align="right"><mark style="background-color:green;">3000</mark></td></tr><tr><td>                Salary</td><td align="right">500</td></tr><tr><td> </td><td align="right"> </td></tr><tr><td>       <mark style="color:green;">Women (Subtract Children)</mark></td><td align="right">1510</td></tr><tr><td>           <mark style="color:yellow;">Revenue (Sum Children)</mark></td><td align="right">5510</td></tr><tr><td>                 Sales </td><td align="right">5000</td></tr><tr><td>                 Receivables</td><td align="right">510</td></tr><tr><td>            <mark style="color:red;">Costs (Sum Children)</mark></td><td align="right">4000</td></tr><tr><td>                  <mark style="background-color:green;">Marketing</mark></td><td align="right"><mark style="background-color:green;">2000</mark></td></tr><tr><td>                   Salary</td><td align="right">2000</td></tr><tr><td> </td><td align="right"> </td></tr><tr><td>    <mark style="color:purple;"><strong>LA (Sum children)</strong></mark></td><td align="right"><strong>-4120</strong></td></tr><tr><td>    <mark style="color:green;">Men (Subtract Children)</mark></td><td align="right">-1200</td></tr><tr><td>            <mark style="color:yellow;">Revenue (Sum Children)</mark></td><td align="right">4000</td></tr><tr><td>                   Sales </td><td align="right">3500</td></tr><tr><td>                   Receivables</td><td align="right">500</td></tr><tr><td>             <mark style="color:red;">Costs (Sum Children)</mark></td><td align="right">5200</td></tr><tr><td>                    <mark style="background-color:green;">Marketing</mark></td><td align="right"><mark style="background-color:green;">4000</mark></td></tr><tr><td>                    Salary</td><td align="right">1200</td></tr><tr><td> </td><td align="right"> </td></tr><tr><td>       <mark style="color:green;">Women (Subtract Children)</mark></td><td align="right">-2920</td></tr><tr><td>             <mark style="color:yellow;">Revenue (Sum Children)</mark></td><td align="right">4080</td></tr><tr><td>                     Sales </td><td align="right">3540</td></tr><tr><td>                     Receivables</td><td align="right">540</td></tr><tr><td>                <mark style="color:red;">Costs (Sum Children)</mark></td><td align="right">7000</td></tr><tr><td>                     <mark style="background-color:green;">Marketing</mark></td><td align="right"><mark style="background-color:green;">5000</mark></td></tr><tr><td>                     Salary</td><td align="right">2000</td></tr></tbody></table>

To achieve this, the following formula should be written in the <mark style="color:orange;">\[US Marketing]</mark> node,

<mark style="color:blue;">**`SUM`**</mark>**`(`**<mark style="color:blue;">**`FOREACH`**</mark>**`(`**<mark style="color:blue;">**`THIS`**</mark>**`.`**<mark style="color:blue;">**`CHILDREN`**</mark>**`,`**<mark style="color:blue;">**`FOREACH`**</mark>**`(`**<mark style="color:blue;">**`THIS`**</mark>**`.`**<mark style="color:blue;">**`CHILDREN`**</mark>**`.`**<mark style="color:blue;">**`THIS`**</mark>**`,`**<mark style="color:blue;">**`THIS`**</mark>**`.`**<mark style="color:blue;">**`CHILDREN`**</mark>**`.`**<mark style="color:blue;">**`GET`**</mark>**`(2).`**<mark style="color:blue;">**`CHILDREN`**</mark>**`.`**<mark style="color:blue;">**`GET`**</mark>**`(1))))`**

### **Explanation**

<table><thead><tr><th width="267"></th><th></th></tr></thead><tbody><tr><td>(FOREACH (THIS.CHILDREN,</td><td>As we are entering the formula in the parent node of both regions - New York and LA , THIS.CHILDREN will refer to each of the children of <mark style="color:orange;">[US Marketing]</mark> node which is <mark style="color:purple;">[New York]</mark> and <mark style="color:purple;">[LA]</mark></td></tr><tr><td>FOREACH (THIS.CHILDREN.</td><td>This will refer to each of the child nodes of <mark style="color:purple;">[New York]</mark> and <mark style="color:purple;">[LA]</mark> which are <mark style="color:green;">[Men]</mark> and <mark style="color:green;">[Women]</mark></td></tr><tr><td>THIS,</td><td>This refers to that same node so it will be <mark style="color:green;">[Men]</mark> and <mark style="color:green;">[Women]</mark> </td></tr><tr><td>THIS.CHILDREN.GET(2).</td><td>This will consider the second child <mark style="color:red;">[Costs]</mark> of the Men and Women nodes as we have mentioned Get(2)</td></tr><tr><td>CHILDREN.GET(1) )))</td><td>This will get the value of the first child of <mark style="color:red;">[Costs]</mark> that is <mark style="background-color:green;">[Marketing]</mark>. Sum of these <mark style="background-color:green;">[Marketing]</mark>nodes are returned which is 14000.</td></tr></tbody></table>


# findByTitle

The findByTitle function can be used when you want to find the values of the nodes with same name/title.

### Syntax

findByTitle(searchString) - > \[?]

### Arguments

<table><thead><tr><th width="225">Arguments</th><th width="201">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>searchString</td><td>Text / Number</td><td>Title to match the node name.</td></tr></tbody></table>

### Remarks

This function can only be used after refering a node for which this calculation needs to be done as shown below in the example.

### Example

Consider a Scenario where you want add all the nodes with title "Apple Sales" & "Orange Sales". Below is the data of apple and orange sales made by different Suppliers.

<table><thead><tr><th width="240">Period</th><th width="83">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td><mark style="color:purple;">Suppliers</mark> (Parent node)</td><td>185800</td><td>192400</td><td>194000</td><td>182400</td><td>188000</td><td>206900</td><td>184900</td><td>186100</td><td>192500</td><td>188600</td><td>202650</td><td>190050</td></tr><tr><td>   Supplier A</td><td>55700</td><td>57900</td><td>60900</td><td>55900</td><td>59200</td><td>62100</td><td>56200</td><td>58600</td><td>59300</td><td>58300</td><td>61400</td><td>60300</td></tr><tr><td>       <mark style="color:green;background-color:yellow;">Apple Sales</mark></td><td>24300</td><td>25300</td><td>25800</td><td>23300</td><td>27300</td><td>28400</td><td>21200</td><td>26900</td><td>25700</td><td>24200</td><td>28900</td><td>27300</td></tr><tr><td>       Orange Sales</td><td>31400</td><td>32600</td><td>35100</td><td>32600</td><td>31900</td><td>33700</td><td>35000</td><td>31700</td><td>33600</td><td>34100</td><td>32500</td><td>33000</td></tr><tr><td>   Supplier B</td><td>60400</td><td>61800</td><td>56600</td><td>56300</td><td>57300</td><td>60900</td><td>58700</td><td>58000</td><td>59000</td><td>62600</td><td>62800</td><td>60800</td></tr><tr><td>       <mark style="color:green;background-color:yellow;">Apple Sales</mark></td><td>22500</td><td>22100</td><td>21800</td><td>23600</td><td>21900</td><td>22300</td><td>24200</td><td>24800</td><td>21700</td><td>25600</td><td>23400</td><td>22000</td></tr><tr><td>       Orange Sales</td><td>37900</td><td>39700</td><td>34800</td><td>32700</td><td>35400</td><td>38600</td><td>34500</td><td>33200</td><td>37300</td><td>37000</td><td>39400</td><td>38800</td></tr><tr><td>   Supplier C</td><td>69700</td><td>72700</td><td>76500</td><td>70200</td><td>71500</td><td>83900</td><td>70000</td><td>69500</td><td>74200</td><td>67700</td><td>78450</td><td>68950</td></tr><tr><td>      <mark style="color:green;">Apple Sales</mark></td><td>43400</td><td>44300</td><td>46700</td><td>45300</td><td>43600</td><td>46900</td><td>44200</td><td>42800</td><td>45900</td><td>43800</td><td>47200</td><td>41000</td></tr><tr><td>       Orange Sales</td><td>26300</td><td>28400</td><td>29800</td><td>24900</td><td>27900</td><td>37000</td><td>25800</td><td>26700</td><td>28300</td><td>23900</td><td>31250</td><td>27950</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[Total Apple Sales] node:

<mark style="color:blue;">**`SUM`**</mark>**`(`**<mark style="color:purple;">**`[Suppliers]`**</mark>**`.`**<mark style="color:blue;">**`DESCENDANTS`**</mark>**`.`**<mark style="color:blue;">**`findbytitle`**</mark>**`("`**<mark style="color:green;background-color:yellow;">**`Apple Sales`**</mark>**`")`**

Here we have mentioned the \[Suppliers] node name before writing Findbytitle which means we are asking the function to go to the descendants of the Suppliers node and get the value under the title "Apple Sales".

### Result

The function will add up all the Supplier's Apple Sales value and give it in the Total Apple Sales node.

<table><thead><tr><th width="240">Period</th><th width="83">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td>Suppliers</td><td>185800</td><td>192400</td><td>194000</td><td>182400</td><td>188000</td><td>206900</td><td>184900</td><td>186100</td><td>192500</td><td>188600</td><td>202650</td><td>190050</td></tr><tr><td>Total Apple Sales</td><td>90200</td><td>91700</td><td>94300</td><td>92200</td><td>92800</td><td>97600</td><td>89600</td><td>94500</td><td>93300</td><td>93600</td><td>99500</td><td>90300</td></tr></tbody></table>


# GETCURRENTRANGE

The GETCURRENTRANGE funtion returns a range of value based on active period and period selection.

### Syntax

DS.(SERIES).GETCURRENTRANGE()

### Example

Consider the below table that has Sales values for all months in a year. Our objective is to find the Quarter-1 Sales value.

<table><thead><tr><th width="83">Periods</th><th width="83">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td><mark style="color:purple;">Sales</mark></td><td>845</td><td>122</td><td>561</td><td>681</td><td>594</td><td>842</td><td>1153</td><td>674</td><td>951</td><td>154</td><td>214</td><td>854</td></tr></tbody></table>

To get the value of First Quarter sales, we should first set the Value display as Sim.Months and keep Jan to Mar as the Simulation Period. Then give the formula as:

<mark style="color:blue;">**`SUM`**</mark>**`(`**<mark style="color:blue;">**`DS`**</mark>**`._Sum_of_2023.`**<mark style="color:purple;">**`[Sales]`**</mark>**`.`**<mark style="color:blue;">**`GETCURRENTRANGE`**</mark>**`())`**

{% hint style="info" %}
Change the Sim.Months according to the values you want to achieve. If you want to get Q4 Sales you should set the Sim.Months as Oct to Dec.
{% endhint %}

### Result

<table data-header-hidden><thead><tr><th width="271"></th><th></th></tr></thead><tbody><tr><td>Q1 Sales</td><td>1528</td></tr></tbody></table>


# GETROWVALUE

The GETROWVALUE function returns the value of the source key row.

### Syntax

DS.(SERIES).GETROWVALUE(sourceKey: string) - > \[number]

### Arguments

sourceKey: string - string that corresponds to the source key.

### Example

Consider the below scenario where we have the Sales values for a Parent node. The objective is to allocate the Sales value of 2020 to all periods of the child node.

#### Parent

<table><thead><tr><th width="64">Year</th><th width="64">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td>2019</td><td>8744503</td><td>8599938</td><td>8642337</td><td>8430046</td><td>8537787.6</td><td>8635150.9</td><td>8751803.7</td><td>8530118</td><td>8546371.7</td><td>8397872.3</td><td>8596191.1</td><td>8379559.9</td></tr><tr><td>2020</td><td>8188477</td><td>7959189</td><td>7470250</td><td>7688532</td><td>8221765</td><td>7188152</td><td>7341150</td><td>8265013</td><td>7718777</td><td>8299877</td><td>8550181</td><td>8544909</td></tr><tr><td>2021</td><td>1890876</td><td>1959373</td><td>2204492</td><td>1809924</td><td>1889838</td><td>1676175</td><td>1844642</td><td>2209590</td><td>1702085</td><td>1650029</td><td>2048406</td><td>1879161</td></tr></tbody></table>

To achieve this, the following formula should be written in the Child node:

<mark style="color:blue;">**`DS`**</mark>**`._Sum_of_2020.`**<mark style="color:blue;">**`GETROWVALUE`**</mark>**`(`**<mark style="color:blue;">**`THIS.PARENT.SOURCE_KEY`**</mark>**`).`**<mark style="color:blue;">**`GET`**</mark>**`(`**<mark style="color:blue;">**`CPI`**</mark>**`)`**

{% hint style="info" %} <mark style="color:blue;">**THIS\_SOURCE\_KEY**</mark> function is explained in detail in [this section](/model/formula-functions/range-functions/this_source_key).
{% endhint %}

### Result

#### Child

<table><thead><tr><th width="64">Year</th><th width="64">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td>2019</td><td>8188477</td><td>7959189</td><td>7470250</td><td>7688532</td><td>8221765</td><td>7188152</td><td>7341150</td><td>8265013</td><td>7718777</td><td>8299877</td><td>8550181</td><td>8544909</td></tr><tr><td>2020</td><td>8188477</td><td>7959189</td><td>7470250</td><td>7688532</td><td>8221765</td><td>7188152</td><td>7341150</td><td>8265013</td><td>7718777</td><td>8299877</td><td>8550181</td><td>8544909</td></tr><tr><td>2021</td><td>8188477</td><td>7959189</td><td>7470250</td><td>7688532</td><td>8221765</td><td>7188152</td><td>7341150</td><td>8265013</td><td>7718777</td><td>8299877</td><td>8550181</td><td>8544909</td></tr></tbody></table>

### Explanation

GETROWVALUE allows the node to look into the row of the parent as mentioned in the formula and get the sum of 2020 value for all periods.


# THIS\_SOURCE\_KEY

The THIS.SOURCE\_KEY function returns the value of the mentioned source key row from the data series.

### Syntax

DS.(SERIES).THIS.SOURCE\_KEY

### Example

Consider the below scenario where we have the Sales values for a Parent node. The objective is to allocate the Sales value of 2020 to all periods of the child node.

#### Parent

<table><thead><tr><th width="64">Year</th><th width="64">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td>2019</td><td>8744503</td><td>8599938</td><td>8642337</td><td>8430046</td><td>8537787.6</td><td>8635150.9</td><td>8751803.7</td><td>8530118</td><td>8546371.7</td><td>8397872.3</td><td>8596191.1</td><td>8379559.9</td></tr><tr><td>2020</td><td>8188477</td><td>7959189</td><td>7470250</td><td>7688532</td><td>8221765</td><td>7188152</td><td>7341150</td><td>8265013</td><td>7718777</td><td>8299877</td><td>8550181</td><td>8544909</td></tr><tr><td>2021</td><td>1890876</td><td>1959373</td><td>2204492</td><td>1809924</td><td>1889838</td><td>1676175</td><td>1844642</td><td>2209590</td><td>1702085</td><td>1650029</td><td>2048406</td><td>1879161</td></tr></tbody></table>

To achieve this, the following formula should be written in the Child node:

<mark style="color:blue;">**`DS`**</mark>**`._Sum_of_2020.`**<mark style="color:blue;">**`GETROWVALUE`**</mark>**`(`**<mark style="color:blue;">**`THIS`**</mark>**`.`**<mark style="color:blue;">**`PARENT`**</mark>**`.`**<mark style="color:blue;">**`SOURCE_KEY`**</mark>**`).`**<mark style="color:blue;">**`GET`**</mark>**`(`**<mark style="color:blue;">**`CPI`**</mark>**`)`**

{% hint style="info" %}
To know about **GETROWVALUE** function, click [here](/model/formula-functions/range-functions/getrowvalue).
{% endhint %}

### Result

#### Child

<table><thead><tr><th width="64">Year</th><th width="64">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td>2019</td><td>8188477</td><td>7959189</td><td>7470250</td><td>7688532</td><td>8221765</td><td>7188152</td><td>7341150</td><td>8265013</td><td>7718777</td><td>8299877</td><td>8550181</td><td>8544909</td></tr><tr><td>2020</td><td>8188477</td><td>7959189</td><td>7470250</td><td>7688532</td><td>8221765</td><td>7188152</td><td>7341150</td><td>8265013</td><td>7718777</td><td>8299877</td><td>8550181</td><td>8544909</td></tr><tr><td>2021</td><td>8188477</td><td>7959189</td><td>7470250</td><td>7688532</td><td>8221765</td><td>7188152</td><td>7341150</td><td>8265013</td><td>7718777</td><td>8299877</td><td>8550181</td><td>8544909</td></tr></tbody></table>

### Explanation

PARENT.SOURCE\_KEY allows the node to look into the source key value of the parent as mentioned in the formula and get the sum of 2020 value for all periods.


# PERIOD\_LOOKUP

A PERIOD\_LOOKUP function returns any periods values.

### Syntax

PERIOD\_LOOKUP(offset, initialValue) - > \[number]

### Arguments

<table><thead><tr><th width="154">Arguments</th><th width="167">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>offset</td><td>Number</td><td>The number of periods it has to go back or front.</td></tr><tr><td>initial Value</td><td>Number</td><td>The value of first period.</td></tr></tbody></table>

### Remarks

* This function can only be used after referring a node for which this calculation needs to be done as shown below in the example.
* If we give negative number for the offset it will go back to the past periods and vice versa.
* Period lookup will only work if there is 1 series (Year). To use it for multiple series PRIOR\_SERIES\_PERIOD\_LOOKUP function should be used along with PERIOD\_LOOKUP.

### Example 1

Consider a scenario where you want to calculate the closing balance of Non-Current assets by including the monthly movements. Below is the information.

<table><thead><tr><th width="180"></th><th width="64"></th></tr></thead><tbody><tr><td>Non-Current Asset Balance</td><td>$30 million</td></tr><tr><td>Depreciation (Straight line)</td><td>12% pa</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[Opening Balance] node:

<mark style="color:purple;">**`[Closing Balance]`**</mark>**`.`**<mark style="color:blue;">**`PERIOD_LOOKUP`**</mark>**`(-1,30000000)`**

Closing Balance node name is referred in the formula before using PERIOD\_LOOKUP so that the calculation is performed for this specific node values. Since we have mentioned the first period value as $30 million it will take this as January month value. After that it will take the Closing Balance node as the previous period value as we have mentioned -1.

### Result

<table><thead><tr><th width="180">Period</th><th width="64">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="75">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sept</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td>Opening Balance</td><td>30000000</td><td>29700000</td><td>29400000</td><td>29100000</td><td>28800000</td><td>28500000</td><td>28200000</td><td>27900000</td><td>27600000</td><td>27300000</td><td>27000000</td><td>26700000</td></tr><tr><td>Monthly movements</td><td>300000</td><td>300000</td><td>300000</td><td>300000</td><td>300000</td><td>300000</td><td>300000</td><td>300000</td><td>300000</td><td>300000</td><td>300000</td><td>300000</td></tr><tr><td><mark style="color:purple;">Closing Balance</mark></td><td>29700000</td><td>29400000</td><td>29100000</td><td>28800000</td><td>28500000</td><td>28200000</td><td>27900000</td><td>27600000</td><td>27300000</td><td>27000000</td><td>26700000</td><td>26400000</td></tr></tbody></table>

### Example 2

Consider a scenario where you have Year 1's Unit price value and Growth rate of Unit price for Years 2 to 5. We need to calculate the current year's price by taking the previous year's price and multiplying it with the growth rate.

<table><thead><tr><th width="255.80327868852464">Year</th><th width="94" align="right">1</th></tr></thead><tbody><tr><td>Unit price</td><td align="right">400</td></tr><tr><td><mark style="color:orange;">Growth rate (Years 2-5)</mark></td><td align="right">5%</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[Unit Price] node:

**`(`**<mark style="color:blue;">**`THIS`**</mark>**`.`**<mark style="color:blue;">**`PERIOD_LOOKUP`**</mark>**`(-1,400)*(1+`**<mark style="color:orange;">**`[Growth rate (Years 2-5)]`**</mark>**`)`**

### Result

| Year       |   1 |   2 |   3 |      4 |      5 |
| ---------- | --: | --: | --: | -----: | -----: |
| Unit price | 400 | 420 | 441 | 463.05 | 486.20 |


# PRIOR\_SERIES\_PERIOD\_LOOKUP

PRIOR\_SERIES\_PERIOD\_LOOKUP function returns prior series period values. It can also go to forward series period values.

### Syntax

PRIOR\_SERIES\_PERIOD\_LOOKUP(seriesOffset, periodIndex, initialValue) -> \[number]

### Arguments

<table><thead><tr><th width="175">Arguments</th><th width="159">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>seriesOffset</td><td>Number</td><td>The number of series it has to go back.</td></tr><tr><td>periodindex</td><td>Number</td><td>The number of periods it has to go back.</td></tr><tr><td>initial Value</td><td>Number</td><td>The value of first period.</td></tr></tbody></table>

### Remarks

This function can only be used after referring a node for which this calculation needs to be done as shown below in the example.

Seriesoffset and periodindex can also go back to many prior series/periods.

### Example&#x20;

Consider a scenario where you want to create cashflow statement for 3 years and refer the closing balance of prior period as opening balance of current period. In the below table net cash in / out for three periods are given. Calculate the opening cash balance and closing cash balance for all periods in 2020,2021, 2022.

<table><thead><tr><th width="185">Period</th><th width="64">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="93">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sept</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td>Opening Cash Balance 2020</td><td>183439</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr><tr><td>Net Cash in/out 2020</td><td>10279</td><td>10413</td><td>14912</td><td>9905</td><td>15466</td><td>7953</td><td>14312</td><td>12984</td><td>12691</td><td>12581</td><td>10357</td><td>31164</td></tr><tr><td>Net Cash in/out 2021</td><td>12335</td><td>2056</td><td>2056</td><td>2056</td><td>2056</td><td>2056</td><td>2056</td><td>2056</td><td>2056</td><td>2056</td><td>2056</td><td>2056</td></tr><tr><td>Net Cash in/out 2022</td><td>12828</td><td>2138</td><td>2138</td><td>2138</td><td>2138</td><td>2138</td><td>2138</td><td>2138</td><td>2138</td><td>2138</td><td>2138</td><td>2138</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[Opening cash Balance] node:

<mark style="color:purple;">**`[Closing Cash Balance]`**</mark>**`.`**<mark style="color:blue;">**`PERIOD_LOOKUP`**</mark>**`(-1,`**<mark style="color:purple;">**`[Closing Cash Balance]`**</mark>**`.`**<mark style="color:blue;">**`PRIOR_SERIES_PERIOD_LOOKUP`**</mark>**`(1,12,183439))`**

Closing Cash Balance node name is referred in the formula before using PERIOD\_LOOKUP & PRIOR\_SERIES\_PERIOD\_LOOKUP so that the calculation is performed for this specific node values. In the PRIOR\_SERIES\_PERIOD\_LOOKUP initial value is given as 183439 which will be considered as first period value for the first series. In the SeriesOffset, the value is given as 1 which will go back to previous series and get the 12th period value from the node Closing Cash Balance. PERIOD\_LOOKUP will get the previous period value.

### Result

<figure><img src="/files/QPd1NiHWa5KSXzMfg8ZJ" alt=""><figcaption></figcaption></figure>

The initial value mentioned in the formula (**183439)** is taken as the January 2020 opening balance. Closing balance of every month is carried forward as the opening balance for the next month. Closing cash balance of 2020 December will be carried forward as opening balance for January 2021. This happens for all the series.


# Static Identifiers

<table><thead><tr><th width="321">CONSTANTS</th><th>EXPLANATION</th></tr></thead><tbody><tr><td><a href="/pages/pDLcWeHsLW0ApFuZyR5j">THIS/ME</a></td><td>Refers to the Current Node</td></tr><tr><td><a href="/pages/8PSbhHu6R9MLiwJa7DsN">CURRENT_SERIES</a>*</td><td>Refers to the Current series label</td></tr><tr><td><a href="/pages/dsqKHQ7uoqs7XTWKkEO4">CURRENT_SERIES_ID</a>*</td><td>Refers to the ID of the current series</td></tr><tr><td><a href="/pages/CXmo5FoMuLUqpe9mDc9e">CURRENT_PERIOD_INDEX (or) CPI</a></td><td>Returns the value of the period selected.</td></tr><tr><td><a href="/pages/oFfOQ1fYfSLi4d8MlqXK">CURRENT_NODE_VALUE</a></td><td>Returns the value of the current node.</td></tr><tr><td><a href="/pages/t6YW4bT5oRDlPKIW6FGS">DS.SERIES</a></td><td>Returns the value from the data series for the specified node value</td></tr></tbody></table>


# THIS/ME

THIS identifier refers to the current node. It cannot be used separately but should be used along with other functions to refer the Parent/Child node. Refer [FOREACH ](/model/formula-functions/range-functions/foreach)to understand it more.

### Arguments

<table><thead><tr><th width="113">Arguments</th><th width="384">Explanation</th></tr></thead><tbody><tr><td>THIS.PARENT</td><td>When you want to access the Parent node of a current node.</td></tr><tr><td>THIS.CHILDREN</td><td>When you want to access the child node of a current node</td></tr></tbody></table>


# CURRENT\_SERIES\*

### Syntax

CURRENT\_SERIES == 'series'? value1:value2

### Arguments

series - Refers to the series, i.e., act, base or tgt.

value1 – The value that should be assigned to the series mentioned in the argument list. If series is mentioned as base, value1 is assigned as baseline series.

value2 – The value that should be assigned to the series other than the one mentioned in the argument list. If series is mentioned as base, value1 is assigned as comparison series.

### Example

Consider a scenario where you want to assign 100 as the monthly baseline value and 85 as the monthly comparison value.

This can be achieved by using the formula:

<mark style="color:blue;">**CURRENT\_SERIES**</mark> <mark style="color:blue;">**==**</mark> <mark style="color:blue;">**'base'?**</mark>**&#x20;100:85**

{% hint style="info" %}
\*This function's development is in progress.
{% endhint %}


# CURRENT\_SERIES\_ID\*

### Syntax

CURRENT\_SERIES\_ID == 'series'? value1:value2

### Arguments

series - Refers to the series label i.e., Forecast, Budget, etc.

value1 – The value that should be assigned to the series mentioned in the argument list. If series is mentioned as Forecast, value1 is assigned as the series Forecast.

value2 – The value that should be assigned to the series other than the one mentioned in the argument list. If series is mentioned as Forecast, value1 is assigned as the series Comparison.

### Example

Consider a scenario where you want to assign 100 as the monthly Forecast value and 85 as the monthly Budget value.

This can be achieved by using the formula:

<mark style="color:blue;">**CURRENT\_SERIES\_ID == 'Forecast'?**</mark>**&#x20;100:85**

{% hint style="info" %}
\*This function's development is in progress.
{% endhint %}


# CURRENT\_PERIOD\_INDEX

Current period index returns the value of the period that is selected.

### Example

Consider the scenario where you want to calculate the Balance due for a loan taken for $40000.

<table><thead><tr><th width="114">Periods</th><th width="64">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td><mark style="color:purple;">Loan amount</mark></td><td>40000</td><td>35000</td><td>30000</td><td>25000</td><td>21000</td><td>17000</td><td>14000</td><td>11000</td><td>8000</td><td>5000</td><td>3000</td><td>1000</td></tr><tr><td><mark style="color:orange;">Amount paid</mark></td><td>5000</td><td>5000</td><td>5000</td><td>4000</td><td>4000</td><td>3000</td><td>3000</td><td>3000</td><td>3000</td><td>2000</td><td>2000</td><td>1000</td></tr></tbody></table>

To achieve this the following formula should be written in the \[Balance due] node:

<mark style="color:purple;">**`[Loan amount]`**</mark>**`-`**<mark style="color:orange;">**`[Amount paid]`**</mark>**`.`**<mark style="color:blue;">**`GET`**</mark>**`(`**<mark style="color:blue;">**`CURRENT_PERIOD_INDEX`**</mark>**`)`**

<table data-header-hidden><thead><tr><th width="158">Column1</th><th width="154">Column2</th><th width="148">Column3</th><th width="149">Column4</th><th>Column5</th><th>Column6</th><th>Column7</th><th>Column8</th><th>Column9</th><th>Column10</th><th>Column11</th><th>Column12</th><th>Column13</th></tr></thead><tbody><tr><td>Balance due</td><td>35000</td><td>30000</td><td>25000</td><td>21000</td><td>17000</td><td>14000</td><td>11000</td><td>8000</td><td>5000</td><td>3000</td><td>1000</td><td>0</td></tr></tbody></table>

### Explanation

As we used the current period index for Amount paid it will take Feb's value to subtract with Feb's loan amount, Mar's value to subtract with Mar's loan amount and so on.


# CURRENT\_NODE\_VALUES

The CURRENT\_NODE\_VALUES function returns the node's current period value.

### Example

Consider a scenario where you want to assign 1000 as the first month's Sales value and want the subsequent periods to have a month-on-month growth of 10%.

To achieve this, the following formula should be written in the \[Sales] node:

<mark style="color:blue;">**`IF`**</mark>**`(`**<mark style="color:blue;">**`CURRENT_PERIOD_INDEX`**</mark>**`==1,1000,`**<mark style="color:blue;">**`CURRENT_NODE_VALUES`**</mark>**`.`**<mark style="color:blue;">**`GET`**</mark>**`(`**<mark style="color:blue;">**`CURRENT_PERIOD_INDEX`**</mark>**`-1)*1.1)`**

### Result

| Period |    1 |    2 |    3 |    4 |    5 |    6 |    7 |    8 |    9 |   10 |   11 |   12 |
| ------ | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| Sales  | 1000 | 1100 | 1210 | 1331 | 1464 | 1611 | 1772 | 1949 | 2144 | 2358 | 2594 | 2853 |


# DS.SERIES

Ths function will return the value of the specified measure from the dataseries.

### Syntax

<table><thead><tr><th width="182">Arguments</th><th width="146">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>DS.SERIES_Title</td><td>Series reference</td><td>Returns the data source value for the mentioned data series</td></tr></tbody></table>

### Example

Find the Variance between sales values of 2020 & 2021.

#### Sales (Data Source)

| Year     | Jan    | Feb    | Mar    | Apr    | May    | Jun    | Jul    | Aug    | Sep    | Oct    | Nov    | Dec    |
| -------- | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ |
| **2021** | 121100 | 124200 | 120900 | 118300 | 116600 | 114900 | 123000 | 116500 | 112200 | 117500 | 119700 | 116100 |
| **2020** | 194971 | 199962 | 194649 | 190463 | 187726 | 184989 | 198030 | 187565 | 180642 | 189175 | 192717 | 186921 |

To achieve this, the following formula should be written in the \[Sales variance] node:

<mark style="color:blue;">**`SUBTRACT`**</mark>**`(`**<mark style="color:blue;">**`DS`**</mark>**`._Sum_of_Sales_2021.Sales.`**<mark style="color:blue;">**`GET`**</mark>**`(`**<mark style="color:blue;">**`CPI`**</mark>**`),`` `**<mark style="color:blue;">**`DS`**</mark>**`._Sum_of_Sales_2020.Sales.`**<mark style="color:blue;">**`GET`**</mark>**`(`**<mark style="color:blue;">**`CPI`**</mark>**`))`**

### **Result**

**Sales Variance**

| 73871 | 75762 | 73749 | 72163 | 71126 | 70089 | 75030 | 71065 | 68442 | 71675 | 73017 | 70821 |
| ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |

The function will take the respective values from the Datasource and give the result in the visual. By using the DS function we can avoid adding too many Datasource nodes to the ValQ Models.


# Node Properties

| Constants                                   | Explanation                                             |
| ------------------------------------------- | ------------------------------------------------------- |
| \[NODE].PARENT                              | Refers to the Parent Node                               |
| \[NODE].CHILDREN                            | Refers to the visible children node                     |
| \[NODE].VISIBLE\_CHILDREN                   | Returns all values of the visible children of a node    |
| \[NODE].HIDDEN\_CHILDREN                    | Returns all values of the hidden children of a node     |
| \[NODE].act                                 | Returns the value of the Simulated Series of the node   |
| \[NODE].tgt                                 | Returns the value of the Comparison Series of the node  |
| \[NODE].base                                | Returns the value of the Baseline Series of the node    |
| \[NODE].ALL\_PERIODS                        | Returns all Period values                               |
| \[NODE].SIM\_PERIODS                        | Returns simulation period values                        |
| \[NODE].act.ALL\_PERIODS                    | Returns all period values of Simulated Series,          |
| \[NODE].tgt.ALL\_PERIODS                    | Returns all period values of Comparison Series          |
| \[NODE].base.ALL\_PERIODS                   | Returns all period values of Baseline Series            |
| \[NODE].act.SIM\_PERIODS                    | Returns simulation period values of Simulated Series    |
| \[NODE].tgt.SIM\_PERIODS                    | Returns simulation period values of Comparison Series   |
| \[NODE].base.SIM\_PERIODS                   | Returns simulation period values of Baseline Series     |
| \[NODE].Range(start\_index,end\_index)      | Returns selected range values                           |
| \[NODE].act.Range(start\_index,end\_index)  | Returns selected range values of Simulated Series       |
| \[NODE].base.Range(start\_index,end\_index) | Returns selected range values of Baseline Series        |
| \[NODE].tgt.Range(start\_index,end\_index)  | Returns selected range values of Comparison Series      |
| \[NODE].Get(period\_index)                  | Returns selected period value                           |
| \[NODE].act.Get(period\_index)              | Returns selected period value of Simulated Series       |
| \[NODE].base.Get(period\_index)             | Returns selected period value of Baseline Series        |
| \[NODE].tgt.Get(period\_index)              | Returns selected period value of Comparison Series      |
| \[NODE].LastNPeriods(n)                     | Returns selected range values                           |
| \[NODE].act.LastNPeriods(n)                 | Returns selected range values of Simulated Series       |
| \[NODE].base.LastNPeriods(n)                | Returns selected range values of Baseline Series        |
| \[NODE].tgt.LastNPeriods(n)                 | Returns selected range values of Comparison Series      |
| \[NODE].TOTAL                               | Returns the all period aggregated value of node         |
| \[NODE].PTD                                 | Returns the period to date aggregated value of node     |
| \[NODE].SEL                                 | Returns the simulation periods aggregated value of node |
| \[NODE].TITLE                               | Returns node TITLE                                      |


# Node Properties Explanation

## **\[NODE].PARENT**

\[NODE].PARENT refers to the parent node of the NODE. This cannot be used seperately and should be used along with other functions while referring to the Parent node.

#### **Example**

If the node Sales has child nodes, East, West, South and Central, the node Sales can be referred to as \[East].PARENT, \[West].PARENT, \[South].PARENT or \[Central].PARENT.

## **\[NODE].CHILDREN**

\[NODE].CHILDREN refers to the children nodes of the NODE. This cannot be used seperately and should be used along with other functions while referring to the Child nodes.

#### **Example**

If the node Sales has child nodes, East, West, South and Central, the child nodes of Sales can be referred to using \[Sales].CHILDREN.

## **Sample Dataset 1**

We will use the following dataset for explaining the below functions.

<figure><img src="/files/oSjq5Eb7pVJMv8xZ6i0f" alt=""><figcaption><p><strong>Profit Node and its children</strong></p></figcaption></figure>

## **\[NODE].VISIBLE\_CHILDREN**

\[NODE].VISIBLE\_CHILDREN refers to the children nodes of the NODE, that are visible and not hidden. This cannot be used separately and should be used along with any aggregation functions like SUM, Product, Subtract etc.

For example, if we want to calculate the sum of visible children of the Profit node, we will use the formula **SUM(\[Profit].VISIBLE\_CHILDREN)**

<figure><img src="/files/RpgVHdnUgE8B2ZMewV1y" alt=""><figcaption><p><strong>Sum of Profit node's visible children</strong></p></figcaption></figure>

## **\[NODE].HIDDEN\_CHILDREN**

\[NODE].HIDDEN\_CHILDREN refers to the children nodes of the NODE, that are hidden. This cannot be used separately and should be used along with any aggregation functions like SUM, Product, Subtract etc.

If we want to calculate the sum of hidden children of the Expenses node, we will give the formula as,

**SUM(\[Expenses].HIDDEN\_CHILDREN)**

<figure><img src="/files/jCzm81I1uPsTWpq87ae9" alt=""><figcaption><p><strong>Sum of Expense node's hidden children</strong></p></figcaption></figure>

## **\[NODE].TITLE\***

\[NODE].TITLE returns the node's TITLE.

**Note**: \*This function's development is in progress.

## **Sample Dataset 2**

This is a dataset of \[Sales] node. This is used for the below examples.

<figure><img src="/files/amOknau9vAeOlBxOj2s4" alt=""><figcaption><p><strong>Sales Node</strong></p></figcaption></figure>

## **\[NODE].ACT**

\[NODE].ACT refers to the Simulated Series of the node. This can only be used along with other functions like SUM, GET(CPI).

SUM(\[Sales].act) will return the simulated values of the sales node.

<figure><img src="/files/yI9lxGS8tUBqVHfBvhNJ" alt=""><figcaption><p><strong>Simulated Series</strong></p></figcaption></figure>

## **\[NODE].TGT**

\[NODE].TGT refers to the Comparison Series of the node. This can only be used along with other functions like SUM, GET(CPI).

SUM(\[Sales].tgt) will return the comparison values of the sales node.

<figure><img src="/files/1XpIFREGfibXq7wWUW5z" alt=""><figcaption><p><strong>Comparison Series</strong> </p></figcaption></figure>

## **\[NODE].BASE**

\[NODE].BASE refers to the Baseline Series of the node. This can only be used along with other functions like SUM, GET(CPI).

SUM(\[Sales].base) will return the baseline values of the sales node.

<figure><img src="/files/H1qW7XtDOCOBZyKNqQYP" alt=""><figcaption><p><strong>Baseline Series</strong></p></figcaption></figure>

## **Sample Dataset 3:**

This is a dataset of \[Cost of Sales] node. This is used for the below examples.

<figure><img src="/files/3nbyd3IxO5T2TBCHsLrN" alt=""><figcaption><p><strong>Cost of Sales</strong></p></figcaption></figure>

## **\[NODE].ALL\_PERIODS**

\[NODE].ALL\_PERIODS refers to all period values. This can only be used along with other functions like SUM, GET(CPI).

\[Cost of Sales].ALL\_PERIODS.GET(CPI) will return baseline values of all periods.

<figure><img src="/files/MCTrNEEAmW5hCZC82547" alt=""><figcaption><p><strong>Baseline Series</strong></p></figcaption></figure>

## **\[NODE].SIM\_PERIODS**

\[NODE].SIM\_PERIODS refers to simulated period values. This can only be used along with other functions like SUM, GET(CPI).

The periods in a model are defined from Jan to Dec and the active simulation period is from Jun to Dec.&#x20;

\[Cost of Sales].SIM\_PERIODS.GET(CPI) will return Simulated values of all Sim periods.

<figure><img src="/files/6GeYbAfpEorYWHnu6Cdg" alt=""><figcaption><p><strong>Simulated Series</strong></p></figcaption></figure>

## **Sample Dataset 4:**

This is a dataset of \[Sales] node. This is used for the below examples.

<figure><img src="/files/FrEFx6OjNE2hvQHYJ1V8" alt=""><figcaption><p><strong>Sales Node</strong></p></figcaption></figure>

## **\[NODE].act.ALL\_PERIODS**

\[NODE].act.ALL\_PERIODS returns all period values of the simulated series. This can only be used along with other functions like SUM, GET(CPI).

\[Sales].act.ALL\_PERIODS.GET(CPI) will return Simulated values of all periods.

<figure><img src="/files/7MHPvUE72eRu2uaQIq2L" alt=""><figcaption><p><strong>Simulated Series</strong></p></figcaption></figure>

## **\[NODE].tgt.ALL\_PERIODS**

\[NODE].tgt.ALL\_PERIODS returns all period values of the comparison series. This can only be used along with other functions like SUM, GET(CPI).

\[Sales].tgt.ALL\_PERIODS.GET(CPI) will return Comparison Series value of all periods.

<figure><img src="/files/ZctN4KMnalRLvzU8cTAU" alt=""><figcaption><p><strong>Comparison Series</strong></p></figcaption></figure>

## **\[NODE].base.ALL\_PERIODS**

\[NODE].base.ALL\_PERIODS returns all period values of the baseline series.This can only be used along with other functions like SUM, GET(CPI).

\[Sales].base.ALL\_PERIODS.GET(CPI) will return Baseline Series value of all periods.

<figure><img src="/files/LRHzitTKibTtjrCeBHGq" alt=""><figcaption><p><strong>Baseline Series</strong></p></figcaption></figure>

## **\[NODE].act.SIM\_PERIODS**

\[NODE].act.SIM\_PERIODS returns simulated period values of the simulated series.This can only be used along with other functions like SUM, GET(CPI).

The periods in a model are defined from Jan to Dec and the active simulation period is from Jun to Dec.

&#x20;\[Sales].act.SIM\_PERIODS.GET(CPI) will return simulated period values of the simulated series.

<figure><img src="/files/P3nsGELP90MF49I0pzie" alt=""><figcaption><p><strong>Simulated Series</strong></p></figcaption></figure>

## **\[NODE].tgt.SIM\_PERIODS**

\[NODE].tgt.SIM\_PERIODS returns simulated period values of the comparison series.This can only be used along with other functions like SUM, GET(CPI).

The periods in a model are defined from Jan to Dec and the active simulation period is from Jun to Dec.&#x20;

\[Sales].tgt.SIM\_PERIODS.GET(CPI) will return simulated period values of the comparison series.

<figure><img src="/files/L9CQOQwoHPlRHT0tpysT" alt=""><figcaption><p><strong>Comparison Series</strong></p></figcaption></figure>

## **\[NODE].base.SIM\_PERIODS**

\[NODE].base.SIM\_PERIODS returns simulated period values of the baseline series.This can only be used along with other functions like SUM, GET(CPI).

The periods in a model are defined from Jan to Dec and the active simulation period is from Jun to Dec.

&#x20;\[Sales].base.SIM\_PERIODS.GET(CPI) will return simulated period values of the baseline series.

<figure><img src="/files/P3nsGELP90MF49I0pzie" alt=""><figcaption><p><strong>Simulated Series</strong></p></figcaption></figure>

## **Sample Dataset 5:**

This is a dataset of \[Sales] node. This is used for the below examples.

<figure><img src="/files/kUHCdGWqcHFMCjeGooyQ" alt=""><figcaption><p><strong>Sales Node</strong></p></figcaption></figure>

## **\[NODE].TOTAL**

\[NODE].TOTAL returns the all period aggregated value of the node.

\[Sales].TOTAL

<figure><img src="/files/7GNAQzQA9nf0SAGvdR0e" alt=""><figcaption><p><strong>Total Sales</strong></p></figcaption></figure>

## **\[NODE].PTD**

\[NODE].PTD returns the period till date aggregated value of the node. The seleted months in Simulte tab will be considered for the PTD calculation and value display should be Sim Months. If Full Year is selected Full Year Values will be Shown instead of PTD.

Here Sim Months is selected and the period is set From Jan to Mar.&#x20;

\[Sales].PTD

<figure><img src="/files/rCE9oYAx1OkeIHlwQt3V" alt=""><figcaption><p><strong>Period to Date Sales</strong></p></figcaption></figure>

## **\[NODE].SEL**

\[NODE].SEL returns the simulation period aggregated value of the node.

\[Sales].SEL

<figure><img src="/files/WOoTGsYwSL28v4ZP3iYZ" alt=""><figcaption><p><strong>Total Simulated Sales</strong></p></figcaption></figure>

## **Sample Dataset 6:**

This is a dataset of \[Sales] node. This is used for the below examples.

<figure><img src="/files/3NLQLYNRLvzDDOaCCrQ7" alt=""><figcaption><p><strong>Sales Node</strong></p></figcaption></figure>

## **\[NODE].RANGE(START\_INDEX,END\_INDEX)**

\[NODE].RANGE(start\_index,end\_index) returns selected range values of the node. The Value display should be selected as Sim.months and the number of periods should be selected in Sim periods. If we keep it as Jan to Apr it will give us 4 month's value. If we keep it as Jan to may it will give us 5 month's value.

SUM(\[Sales].RANGE(9,12)) will return the values of Sept to Dec as the full period value.

<figure><img src="/files/E7IKr0pqCP7sphKEoncS" alt=""><figcaption><p><strong>Sum of Baseline Series from Sept to Dec</strong></p></figcaption></figure>

## **\[NODE].act.RANGE(START\_INDEX,END\_INDEX)**

\[NODE].act.RANGE(start\_index,end\_index) returns selected range values of Simulated Series.

SUM(\[Sales].act.RANGE(9,12)) will return the simulated values of Sept to Dec as the full period value.

<figure><img src="/files/FBiqxmsii79EJLd1YK0s" alt=""><figcaption><p><strong>Sum of Simulated Series from Sept to Dec</strong></p></figcaption></figure>

## **\[NODE].base.RANGE(START\_INDEX,END\_INDEX)**

\[NODE].base.RANGE(start\_index,end\_index) returns selected range values of Baseline Series.

SUM(\[Sales].base.RANGE(9,12)) will return the baseline values of Sept to Dec as the full period value.

<figure><img src="/files/E7IKr0pqCP7sphKEoncS" alt=""><figcaption><p><strong>Sum of Baseline Series from Sept to Dec</strong></p></figcaption></figure>

## **\[NODE].tgt.RANGE(START\_INDEX,END\_INDEX)**

\[NODE].tgt.RANGE(start\_index,end\_index) returns selected range values of Comparison Series.

SUM(\[Sales].tgt.RANGE(9,12)) will return the comparison values of Sept to Dec as the full period value.

<figure><img src="/files/QmgZhtoukLa59mkM0UM8" alt=""><figcaption><p><strong>Sum of Comparison Series from Sept to Dec</strong></p></figcaption></figure>

## **\[NODE].GET(PERIOD\_INDEX)**

\[NODE].GET(period\_index) returns the selected period value of the node.

\[Sales].GET(6) will return the value of 6th month which is June

<figure><img src="/files/x7IXwhmfSZd335JTzriS" alt=""><figcaption><p><strong>June month Baseline values</strong></p></figcaption></figure>

## **\[NODE].act.GET(PERIOD\_INDEX)**

\[NODE].act.GET(period\_index) returns the selected period value of the Simulated Series.

\[Sales].act.GET(6) will return the simulated value of the month June

<figure><img src="/files/SuaDOZa8Oz21WVCCpFE5" alt=""><figcaption><p><strong>June month Simulated values</strong></p></figcaption></figure>

## **\[NODE].base.GET(PERIOD\_INDEX)**

\[NODE].base.GET(period\_index) returns the selected period value of the Baseline Series.

\[Sales].base.GET(6) will return the baseline value of the month June

<figure><img src="/files/x7IXwhmfSZd335JTzriS" alt=""><figcaption><p><strong>June month Baseline values</strong></p></figcaption></figure>

## **\[NODE].tgt.GET(PERIOD\_INDEX)**

\[NODE].tgt.GET(period\_index) returns the selected period value of the Comparison Series.

\[Sales].tgt.GET(6) will return the comparison value of the month June

<figure><img src="/files/kpBXXvowv3UuPxCCCuIk" alt=""><figcaption><p><strong>June month Comparison values</strong></p></figcaption></figure>

## **\[NODE].LastNPeriods(n)**

\[NODE].LastNPeriods(n) returns selected range values of the node. This cannot be used seperately and should be used along with other aggregate functions like SUM,PRODUCT,SUBTRACT.

If we want to calculate the sum of previous two periods, the formula should be SUM(\[Sales].LastNPeriods(2))

<figure><img src="/files/VmIMstxzFwbGRiZGfhos" alt=""><figcaption><p><strong>Sum of Baseline Values of Previous 2 Periods</strong></p></figcaption></figure>

## **\[NODE].act.LASTNPERIODS(N)**

\[NODE].act.LastNPeriods(n) returns selected range values of the Simulated Series.This cannot be used seperately and should be used along with other aggregate functions like SUM,PRODUCT,SUBTRACT.

SUM(\[Sales].act.LastNPeriods(2)) will return the Sum of the simulated values of the previous two periods.

<figure><img src="/files/ha8AsQrxDaHeNbWMxYNg" alt=""><figcaption><p><strong>Sum of Simulated Values of Previous 2 Periods</strong></p></figcaption></figure>

## **\[NODE].base.LASTNPERIODS(N)**

\[NODE].base.LastNPeriods(n) returns selected range values of the Baseline Series.This cannot be used seperately and should be used along with other aggregate functions like SUM,PRODUCT,SUBTRACT.

SUM(\[Sales].base.LastNPeriods(2)) will return the Sum of the baseline values of the previous two periods.

<figure><img src="/files/VmIMstxzFwbGRiZGfhos" alt=""><figcaption><p><strong>Sum of Baseline Values of Previous 2 Periods</strong></p></figcaption></figure>

## **\[NODE].tgt.LASTNPERIODS(N)**

\[NODE].tgt.LastNPeriods(n) returns selected range values of the Comparison Series.This cannot be used seperately and should be used along with other aggregate functions like SUM,PRODUCT,SUBTRACT.

SUM(\[Sales].tgt.LastNPeriods(2)) will return the Sum of the comparison values of the previous two periods

<figure><img src="/files/dvv5vPsvkrAhNnkfylMJ" alt=""><figcaption><p><strong>Sum of Comparison Values of Previous 2 Periods</strong></p></figcaption></figure>


# Global Settings

The Settings tab allows you to configure global-level settings for the visual.

To access the Settings menu, go to the **Model** Tab and then click **Settings** on the toolbar at the top.

<figure><img src="/files/lkW6M6XaFi53mdYfzaFW" alt=""><figcaption><p><strong>Click 'Settings'</strong></p></figcaption></figure>

Settings are categorized as General and Display, within which many sections are available. You can also use the search box to jump to the required sub-menu directly.

<figure><img src="/files/RR5XRf1rykc1s4rvOWQp" alt=""><figcaption><p><strong>Settings window</strong></p></figcaption></figure>

## 1. General

### 1.1. About Model

#### **Model Name**

The name of the model can be changed here. This will appear at the bottom right corner of the screen in all the tabs.

<figure><img src="/files/1nRxuCmt3OC9Wf4Ozls9" alt=""><figcaption><p><strong>Model Name</strong></p></figcaption></figure>

#### **Enable Model tab in Reading view**

By default, the model tab is available only in the editing view in the Power BI service. Toggle this button to use the model tab in the reading view.

<figure><img src="/files/LQ6K5nIEgoqNFhjVeiV5" alt=""><figcaption><p><strong>Enable Model Tab in Reading View</strong></p></figcaption></figure>

A sample ValQ model looks as shown below before enabling this option.

<figure><img src="/files/Pw1nFPuszZ2oJpz9V7Jz" alt=""><figcaption><p><strong>Before enabling model tab in the reading view</strong></p></figcaption></figure>

After toggling on this button, the report now has the model tab in read mode.

<figure><img src="/files/2W1M7RWtfv3IfSL8jzfX" alt=""><figcaption><p><strong>After enabling model tab in the reading view</strong></p></figcaption></figure>

#### **Simulation Settings**

To create multiple initiatives within your simulations, you can enable this toggle button.&#x20;

<figure><img src="/files/jpq7clckW4LpAJAV3DlC" alt=""><figcaption><p><strong>Enable Initiatives</strong></p></figcaption></figure>

By default, this feature is disabled. To know more about initiatives refer to [this section.](/simulate/create-initiatives-in-a-scenario)

#### **Model Settings**

Enabling this button allows different node configurations for open and closed periods. To know more about hybrid period configuration, you can refer [here](/model/node-settings#hybrid-configuration).

<figure><img src="/files/EjDmVwahxnrtjzFl201H" alt="" width="563"><figcaption><p><strong>Enable Open Period Formula</strong></p></figcaption></figure>

### 1.2. Data Settings

The Data Settings menu helps in transforming the data that is added to the visual in the desired manner before you can start building the model.

#### Split Series by Fiscal Year

You can break down the data series added to the visual, into multiple series using the **Split Series** option.

{% hint style="info" %}
**Note:**

1. The **Split Series** option gets enabled only when the visual is mapped with the data series containing data from **multiple years.**
2. Suppose the time period data you have assigned is not in a hierarchy and has custom time formats like 2023Q1, 23, Jan, 07, etc., you'll need to verify whether the **Time Interval Mapping** is automatically done by ValQ. Otherwise, you'll need to [map it manually](#1.3.-time-interval-mapping) for the visual to identify and map the time periods accordingly before using the **Split Series** option.
   {% endhint %}

A single data series can be split into multiple series where you can define the starting and ending periods for the fiscal year like April to March, Q1 to Q4, and so on. Based on the starting period you assign, ValQ automatically configures the ending period.

In the below example, the visual has a data series assigned, that contain 6 years of data from 2017 to 2022.

<figure><img src="/files/EECJHdI6YinDSdDVF8O4" alt=""><figcaption><p><strong>Before Split Series</strong></p></figcaption></figure>

By clicking the **Split Series** option, a pop-up appears on the screen where you can define the start period of the fiscal year. Since April is chosen as the starting period, ValQ automatically fills the end period as March.

As shown in the below example, the source series is split into six separate data series for each fiscal year from April 2016 to March 2022.

<figure><img src="/files/uSx3V3MDuRxhTXg9iBu4" alt=""><figcaption><p><strong>After Split Series by year</strong></p></figcaption></figure>

Let us now explore the different columns available here.

**Source:** This refers to the initial data series assigned in the **Values** field before splitting the series.

**Name:** This refers to the multiple series names. They can be renamed by the user in the Split Series pop-up window. By default, the series name starts with the end year followed by the name of the source data series.

**Type:** This column contains details about the source of the data series. 'Native' type refers to the native Power BI series assigned to the visual, while 'Plan' refers to the plan series created by the user.

**\*Forecast Start:** This feature used in the hybrid formula is still under development.

**Previous Series:** The available data series are mapped to their respective previous series (series that comes before logically) by ValQ automatically. Users are allowed to change the previous series if required.

**Excluded Series:** In this column, you can choose to exclude any of the data series that are not required. The last two recent data series cannot be excluded as they become the default baseline and comparison series.&#x20;

{% hint style="info" %}
The excluded series, though excluded in the Plan, Simulate and Report tabs, would still be available for calculations and formula reference.&#x20;
{% endhint %}

After splitting the series, you can compare and simulate any two series as baseline and comparison.

<figure><img src="/files/luW4QWPUq1jnOWsaJbvg" alt=""><figcaption><p><strong>Available Data Series</strong></p></figcaption></figure>

### 1.3. Time Interval Mapping

If the time periods are assigned as individual fields instead of using a time hierarchy, ValQ automatically maps them to the model using the custom formats as shown in the below image.

<figure><img src="/files/tfSK73xz3YIHXALVTky0" alt=""><figcaption><p><strong>Time Interval Mapping</strong></p></figcaption></figure>

In some cases, when mapping is not done automatically you can map the time periods manually as per the time format.&#x20;

In the below example, 'Year' is not mapped.

<figure><img src="/files/qnYNX8odF0GxRggZC3ZF" alt=""><figcaption><p><strong>Time period not mapped</strong></p></figcaption></figure>

Let us see how to map the time periods manually in such cases.

Three columns are listed - Time Period, Type and Format.

**Time Period:** ValQ pre-fills all three time periods in this field (Year, Quarter and Month) based on the data you assigned in the **Time Period** field.&#x20;

**Type:** Depending on the nature of the data select the appropriate time period from the dropdown list like Year, Quarter, Month or Day.

**Format:** Finally, under the **Format** column, key in the pattern, the way the values are available in your data. Type **\[**  or hover over the help icon <img src="/files/lyuxuJHVId0L7UcNuM6z" alt="" data-size="line">to open the list of suggested formats.

E.g. If the time period is of the form 2022 Q2, enter \[YYYY] in the Year field and Q\[Q] in the Quarter field to map it.

<figure><img src="/files/HwHeCzntXRzmBe37Ll9n" alt=""><figcaption><p><strong>Available Custom Time Formats</strong></p></figcaption></figure>

When the green tick is shown verifying that the entered format matches with the available time label, click **Apply Changes**. This ensures that the visual accepts the data in the appropriate time format.

<figure><img src="/files/TkWJEJPU4IdpIbYBTViB" alt=""><figcaption><p><strong>Format matched</strong></p></figcaption></figure>

### 1.4. Data Window Size

Using the **Data Window** section, you can load additional columns or periods from the data source into the model. The **Max Columns** is set as 15 by default and can extend up to 60 based on the data you assign, beyond which the visual would display a warning, 'Too many 'Month' values'.

<figure><img src="/files/vKZoBOFR2eUTgcY2VaBL" alt=""><figcaption><p><strong>Max Columns Reached</strong></p></figcaption></figure>

At this point, go to **Settings->Data Window Size** where you can increase the Max Columns to the required number up to 1000.

<figure><img src="/files/7MBu5wCP81cv8Hb34D4B" alt=""><figcaption><p><strong>Increase Data Window Size</strong></p></figcaption></figure>

## 2. Display

All the display-related settings are available here.

### 2.1. Nodes

The Nodes menu has a bunch of checkbox options with regard to how the nodes should work. They are explained below.

**Conditional Formatting:** Check this option to apply conditional formatting to the nodes on the Simulate tab based on the node's **simulation impact** instead of variance.

<figure><img src="/files/sA0nCRek0fSoJcmLaTQI" alt=""><figcaption><p><strong>Conditional Formatting &#x26; Advanced Options</strong></p></figcaption></figure>

**Advanced:** Here, using the first option you can specify the model to use manual values for the nodes whose data source value is empty. The other option is used to disable the editing of nodes in the Plan tab whose **Simulation Method** is set to *None*.

**Node Customization**

Two node presets are available to customize the layout style of the nodes. Preset 1 is the default style.

<figure><img src="/files/HJvbSJlCswyh9dUqPs5P" alt=""><figcaption><p><strong>Node Customization</strong></p></figcaption></figure>

### 2.2. Number Formatting

The Number Formatting menu has options to change the suffix of scaling and formatting the display settings of numbers.

<figure><img src="/files/y5oI0Jt4gXFg1a69nw49" alt=""><figcaption><p><strong>Number Formatting</strong></p></figcaption></figure>

### 2.3. Period Measure

With the Period Measure menu, the labels of time period measures such as Till Period, All Periods and Simulation Period can be renamed.

<figure><img src="/files/odk1GVcYpLQk1dBpB2zo" alt=""><figcaption><p><strong>Period Measure</strong></p></figcaption></figure>

{% hint style="info" %}
Till Period refers to all the periods leading up to the starting simulation period. The **Exclude Active Period** checkbox can be used to exclude the starting simulation period in the Till Period.
{% endhint %}

### 2.4. Level Name Configuration

The levels are named by the visual based on the categories assigned in the Visualizations pane. Double-click on the text to rename any level except Level 1 which would always be the name of the root node.&#x20;

<figure><img src="/files/9rsr4DiiAMwXjTlWT1Nk" alt=""><figcaption><p><strong>Level Name Configuration</strong></p></figcaption></figure>

### 2.5. Theme

The Theme menu has options to change the font style, chart theme and logo to be displayed along with the model's name. The ValQ logo is available in the visual as the default logo which can be replaced by any 500\*500px jpeg or png file.

<figure><img src="/files/BwZnBB4WaaVswAzqXaXN" alt=""><figcaption><p><strong>Theme</strong></p></figcaption></figure>

## 3. Export

Export is provided to get the encoded text of the entire visual, which can then be used to import the model into a new visual.&#x20;

To export the model, click the **Export** button at the bottom left corner of the Settings window. A pop-up window with encoded text is displayed which can be downloaded by clicking the **Download** button.

<figure><img src="/files/yLk6fkgWhuHunifSnBPJ" alt=""><figcaption><p><strong>Export Model</strong></p></figcaption></figure>

The text file gets the model saved in your local system. This exported file can be shared and used to create a new model. The steps to create a new model with the exported text can be found [here](/model/create-model/import-a-model).

## 4. Delete

The current model can be deleted using the **Delete** button in the Settings tab. To permanently delete the model, click **Yes** in the **Delete Model** confirmation pop-up.

<figure><img src="/files/ZHRGX4dvwbvDlFrTlKlC" alt=""><figcaption><p><strong>Delete Model</strong></p></figcaption></figure>


# Plan

Intuitively perform planning, budgeting and forecasting through an editable table interface

Using Plan Tab, you can:

* Create a new plan/budget based on an existing data series
* Create a new plan from scratch (Zero-based Budgeting)
* Plan continuously by creating a rolling forecast
* Perform Time Series Forecasting
* Update an existing plan/forecast by leveraging various allocation methods

Take a look at the Plan tab below

<figure><img src="/files/zHcpGYyz29eh1ygre5St" alt=""><figcaption><p><strong>Plan Tab</strong></p></figcaption></figure>

{% hint style="info" %}
In the Power BI service, the plan tab is available only in the **Editing view**.
{% endhint %}


# Create New Plan

In this section, we will see how to create a plan series and the different plan configurations that are available in ValQ.

## **Steps to Create a Plan Series**

### **Step 1: Click Plan**

Click **Plan** on the main navigation bar to open the Plan tab. When you open Plan tab for the first time, a pop-up window **Create a Plan** appears on the screen.&#x20;

<figure><img src="/files/nBVeDiJtAlPad5ZNYbdI" alt=""><figcaption><p><strong>Create a Plan</strong></p></figcaption></figure>

### **Step 2: Configuration Options**

In the pop-up window, you have the following options to configure your new plan series.

**Series Name:** Name your new series here. By default, the series would be named as *Plan Series 1, Plan Series 2* and so on as and when you create new ones.

<figure><img src="/files/D65HaqUM1pAQLJiONkRS" alt="" width="375"><figcaption><p><strong>Series Name</strong></p></figcaption></figure>

**Starting Forecast Period:** You can choose the forecasting period to start from any period in the series. Period can be of any time dimension, but throughout this document, for the purpose of illustration we'll consider the example of months in a calendar year.

<figure><img src="/files/z7CftV49jLFULg5eCEik" alt="" width="375"><figcaption><p><strong>Starting Forecast Period</strong></p></figcaption></figure>

With that, let us see the options available based on the month you choose.

### **Case 1:** When you choose the first period as the starting forecast period

In this case, the forecasting is performed for the full year and there is no closed period or actuals.

**Forecast Period:** This automatically sets as *Jan-Dec,* since all periods (January to December) are taken as forecast periods.

<figure><img src="/files/RVro5KYew5swOPsEKDBp" alt="" width="563"><figcaption><p>'<strong>Jan' as the starting forecast period</strong></p></figcaption></figure>

**Type:** In this dropdown menu, you will be provided with three options to create a new series.

1. Copy Series
2. Forecast
3. Empty Series

Each of the above types is explained in detail here: [Types of Series](#types-of-series).

**Configuration:** Choose the underlying series or time periods from this menu, with which the new series has to be created.

### Case 2: When you choose any other period as the starting forecast period

In this case, we will take *April* period as the starting forecast period and as a result *Jan to Mar* are considered as Closed Periods.&#x20;

**Forecast Period:** This automatically sets as *Apr-Dec.*

**Closed Period:** All the periods before the forecast period i.e. from Jan to Mar are taken as Closed Periods. Closed period values can be chosen from **Copy Series** dropdown list consisting of all the existing series.

{% hint style="info" %}
The Closed Period values are displayed in locked/disabled state which cannot be edited.
{% endhint %}

<figure><img src="/files/EUFRDY6iw5NWevjwtO2V" alt="" width="563"><figcaption><p><strong>April as the starting forecast period</strong></p></figcaption></figure>

**Type:** In this dropdown menu, you will be provided with five options for configuring the forecast period values to create a plan series.

1. Copy Series
2. Forecast
3. Empty Series
4. Moving Average
5. Last Value

Each of the above types is explained in detail here: [Types of Series](#types-of-series).

**Configuration:** Choose the underlying series or time periods from this menu, with which the new series has to be created.

### Case 3: Creating Multiple Forecast Periods in a Single Plan Series

You can create a plan series with multiple time frames, with each time frame forecasted using different type and configuration.

**Starting Forecast Period:** It can be *Jan* or any period. There may or may not be closed periods, depending on the selected period (Case 1 or Case 2 as discussed above).

**Forecast Period:** Here you can create multiple forecast periods by selecting different end periods for each of the series. New series can be added by clicking on the **+Add new** option available beside Configuration.

<figure><img src="/files/IUQI5MncirEt7XpKWpmL" alt="" width="563"><figcaption><p><strong>Add new - option</strong> </p></figcaption></figure>

{% hint style="info" %}
The **+ Add new** option gets enabled only if the end period selected in the **Forecast period** is not the last period. (in the above example, end period is selected as *Jun* and not *Dec).*
{% endhint %}

**Type and Configuration:** Each forecast series can have its own type and configuration based on your plan requirements.

<figure><img src="/files/ANJgRozfI8ZU2fj5pFEQ" alt="" width="563"><figcaption><p><strong>Multiple Forecast Periods</strong></p></figcaption></figure>

Use the Bin icon next to the period configuration to delete the required time period and reconfigure.

### **Step 3: Enable Driver based Planning**

Enabling this option allows the users to configure driver inputs in the series and perform driver-based planning. &#x20;

<figure><img src="/files/I3Xh77NOK7CyNL3mOJHI" alt="" width="563"><figcaption><p><strong>Enable Driver based Planning</strong></p></figcaption></figure>

Note: This feature can also be enabled later using the option available in the toolbar.&#x20;

For more details on enabling and configuring the driver inputs, you can refer to [this section](/plan/driver-based-planning/enabling-driver-based-plan) and [this section.](/plan/driver-based-planning/configuring-driver-inputs)

### **Step 4: Keep Source Data in Report**&#x20;

By default, whenever a plan series is created, its initial source data (from which it was created) is not stored anywhere in the report. This implies that any changes made to the underlying source would impact all the series that are derived from it in the run time.

To retain the underlying source data and store it in the report you can check this option:

<figure><img src="/files/3PBC5JbCM9ruU3mfVtF7" alt="" width="375"><figcaption><p><strong>Keep Source Data</strong></p></figcaption></figure>

Upon checking this, the new plan series retains its initial source data values, even if any changes are made to the underlying source.

#### Example

Let's say you configured *Plan Series 2* from *Plan Series 1.*&#x20;

On checking this option, any changes made in *Plan Series 1* do not impact *Plan Series* 2 and it retains the original source data as shown below:

<figure><img src="/files/J1C1TyMYggHiMju03a3T" alt=""><figcaption><p><strong>Plan Series 2 retains the original source data</strong></p></figcaption></figure>

**Note:** Consider the data and report size while choosing to store the source data in the report as it can affect the loading time for larger reports.

{% hint style="info" %}
After retaining the source data, if at any point the report data needs to be updated as the source, the **Refresh Data** option can be used.
{% endhint %}

If this option is unchecked, *Plan Series 2* reflects all the changes that you make in *Plan Series 1*.&#x20;

<figure><img src="/files/5Xq3pPIJ50o6OHgMmmpM" alt=""><figcaption><p><strong>Source Data not retained</strong></p></figcaption></figure>

### **Step 5: Add Series**

After configuring all the details, click **Add Series** to create it.

## Types of Series

Let us now understand the different options for creating a new series.

### **1. Copy Series**

This option creates a plan series that exactly copies all the data from the underlying series chosen from **Configuration** menu. You can now perform planning on this new series that is a replica of the chosen existing series.

There are two examples below. &#x20;

#### Example 1

The new series is created as an exact copy/duplicate of *Sum of 2021* series.

<figure><img src="/files/Q2fF11R4fCNLC4YPC3rW" alt="" width="563"><figcaption><p><strong>Copy Series</strong></p></figcaption></figure>

<figure><img src="/files/hsFsRvBvUIwbk2D0TYqs" alt=""><figcaption><p><strong>New Plan Series</strong></p></figcaption></figure>

#### Example 2

The new series is created as a copy of *Sum of 2022* series only from April-Dec while the closed period data is copied from *Sum of 2021* series.

<figure><img src="/files/jqBO8sjJZYORNcFRVkkh" alt="" width="563"><figcaption><p><strong>Copy with Closed Period</strong></p></figcaption></figure>

Clicking on **Add Series** generates the below series with closed periods from January to March. The closed periods are locked and visually indicated by greyed-out cells.

<figure><img src="/files/ztI8kOkvTzJOrmvr7KWz" alt=""><figcaption><p><strong>New Series with Open and Closed Periods</strong></p></figcaption></figure>

### **2. Forecast**

A new plan series can be created by performing time series forecasting on the historical data.

To perform it, select **Forecast** from the Type dropdown menu. Then, click **Configure** under Configuration to configure the settings such as the source and target periods, forecasting method, past data series, etc. that are needed to perform the forecasting.

<figure><img src="/files/q82egCdGae6D85tucqM5" alt="" width="563"><figcaption><p><strong>Forecast</strong></p></figcaption></figure>

This opens a pop-up where you can configure the weights to be applied to the previous series, the statistical method to be used, etc. as shown below.

<figure><img src="/files/4ql4iAnJk3z1o1P3LOcn" alt=""><figcaption><p><strong>Forecast Pop-up Window</strong></p></figcaption></figure>

For a detailed understanding of the forecasting methods, refer to the next section: [Time Series Forecasting.](/plan/time-series-forecasting)

### **3. Empty Series**

Choose this if you do not have any past data series and/or you want to plan from scratch. This creates a blank series in which you can key in your values.

<figure><img src="/files/yAUu13rCc4uqCwRA5mcp" alt="" width="563"><figcaption><p><strong>Empty Series</strong></p></figcaption></figure>

On clicking **Add Series**, a blank series is created as shown below.

<figure><img src="/files/dPAibXcWE2j97s19sPVp" alt=""><figcaption><p><strong>Empty Series is created</strong></p></figcaption></figure>

{% hint style="info" %}
Empty Series can be used to perform Zero Based Budgeting.
{% endhint %}

### **4. Moving Average**

This creates series values based on the moving average of the period you choose in configuration.

<figure><img src="/files/h2odzeZfDcpzqv2pJsI7" alt="" width="563"><figcaption><p><strong>Moving Average</strong> </p></figcaption></figure>

Clicking on **Add Series** generates the below series with a closed period from January to April which is greyed out to indicate that it is closed. The remaining values from May to December are the moving average of the closed period.

<figure><img src="/files/CNNgoULns2O0WlgkLBNN" alt=""><figcaption><p><strong>Moving Average-Example</strong></p></figcaption></figure>

### **5. Last Value**

This copies the values of the selected node to all the open periods. Last values can be useful when you want to retrieve and use a specific period's value for other periods.

<figure><img src="/files/ZP3I8EwkIMrobHGQjBnx" alt="" width="563"><figcaption><p><strong>Last Value</strong></p></figcaption></figure>

In the below example, April to December values are taken from March month's values as Configuration is chosen as Mar.&#x20;

<figure><img src="/files/RLecy2ZU8kGgh2PatOdw" alt=""><figcaption><p><strong>Last Value-Example</strong></p></figcaption></figure>

{% hint style="info" %}
You can perform a **rolling forecast** by changing the starting forecast period at the end of every month manually, while keying in the actuals for the closed period.
{% endhint %}

Subsequent new plans can be created by clicking **+ (Add New Series)** at the bottom of the visual.


# Time Series Forecasting

ValQ has built-in time series forecasting capabilities that allow you to forecast based on the past data collected, without writing a single line of code. There are two ways in which you can access this powerful feature:

1. **While creating a new plan series:** From the **Create a Plan** pop-up, select **Forecast** in the **Type** drop-down menu and click **Configure.**

<figure><img src="/files/a88csApImpk0kSnB4cSy" alt="" width="563"><figcaption><p><strong>Forecast while creating a new plan</strong></p></figcaption></figure>

2. **After creating a plan series:** Select any cell on the series and click **Forecast** from the Actions Menu to forecast for that node.&#x20;

<figure><img src="/files/SeC5jOhP0qmcj8rJmhE5" alt=""><figcaption><p><strong>Forecast after creating a plan series</strong></p></figcaption></figure>

## Forecast Configuration

The Forecast window gives you the configuration options for time series forecasting with which you can make predictions designed to suit your needs.

<figure><img src="/files/oTlA0ZscNF9U8IEJwxiA" alt=""><figcaption><p><strong>Forecast Pop-up Window</strong></p></figcaption></figure>

{% hint style="info" %}
If you start forecasting while creating a new series, the forecast window does not contain the **Target Node** option to choose from. However, after selecting the forecast type, you will be prompted to choose the same when you want to run the forecast.
{% endhint %}

<table><thead><tr><th width="100"></th><th width="225">Options</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>Target Node</td><td>Node for which forecast is done</td></tr><tr><td>2</td><td>Target Periods</td><td>Period for which forecast is done</td></tr><tr><td>3</td><td>Source Periods</td><td>The historical data period to be considered for the forecast</td></tr><tr><td>4</td><td>Grow By</td><td>Period-over-period growth component can be added here if required, either as an absolute value or in percentage. Use the dropdown to change between None, Value and Percentage.</td></tr><tr><td>5</td><td>Past Data Series &#x26; Weights</td><td>Choose the historical data series for forecasting along with its weightage.</td></tr><tr><td>6</td><td>Method</td><td><p>Select the desired forecasting method to be applied from the list: </p><p>Linear Trend, Moving Averages, Weighted Moving Average, ARIMA, Single Exponential Smoothing, Holt's Method &#x26; Holt-Winters Method.</p></td></tr><tr><td>7</td><td>Distribution Method</td><td><p>Choose the distribution method as Match or M2M.</p><p><strong>Match</strong> is to distribute the total according to the weights of periods belonging to a single data series.<br><strong>M2M(+1), M2M(+2),..</strong>is used to distribute the total according to the average weights of the periods  from multiple data series.</p></td></tr></tbody></table>

{% hint style="info" %}
M2M(+1) and M2M(+2) distribution options get enabled when you choose two or more data series for weight distribution in the Forecast pop-up.
{% endhint %}

## Forecasting Methods

Following are the *Forecasting Methods* available:

1. Moving Averages
2. Weighted Moving Average
3. Linear Trend
4. Auto Regression-Integrated Moving Averages (ARIMA)
5. Single Exponential Smoothing
6. Holt's Method (Double Exponential Smoothing)
7. Holt-Winter's Method(Triple Exponential Smoothing)

## 1. Moving Averages

The moving average method forecasts the results of Target Node for the Target Period, by calculating the Moving Average of Past Data Series period values.&#x20;

A Simple Moving Average is computed by dividing the sum of all the included period values by the total number of periods.

**Simple Moving Average= (a1+a2+a3+..+an)/n**

where,

**a1,a2,a3,.....an** are the period values and

**n** is the total number of periods (2 years = 24 periods)

The forecasted series is predicted from the past series by applying the above computation method.

The growth component can also be added as an absolute value or as a percentage when needed and the Distribution Method can be selected as Match or M2M(+1).

### Example: Moving Average Forecast with Growth Component and Distribution Method as M2M

In this example, forecasting is done for the node 'Total Net Profit' for the year 2023 based on the *Sum of 2021* and the *Sum of 2022* series with equal weights as 1 and 1 respectively and 5% growth. The Forecast Method applied is the Moving Average with 'M2M(+1)' as the Distribution Method which distributes the total to its periods based on the average distribution of all Past Series Data chosen. The below figure shows the results of forecasting done based on the above configuration and the net growth is indicated in the **Results** section which is 4.9%.

<figure><img src="/files/zjcZ5ir76OYP0hiYoY5a" alt=""><figcaption><p><strong>Moving Averages Method</strong> </p></figcaption></figure>

## 2. Weighted Moving Average

The Weighted Moving Average method computes the forecast results of Target Node for the Target Period based on the Weighted Moving Average of Past Data Series, their Weights and Source Periods.

Unlike a simple moving average model that assigns equal weights to all the period values, a weighted moving average allows us to assign different weights to different periods. As a result, the accuracy of the model is improved by assigning more weights to the recent periods than to the older periods which could be irrelevant.

It is computed by dividing the sum of weighted period values (product of weight and the period value) by the sum of weights.

Weighted moving average WMA= (w1\*a1 + w2\*a2 +...+wn\*an) / (w1+w2+...+wn),

where

w1,w2,w3,....wn = weights assigned to the period values

a1,a2,a3,........an = period values

The growth component can be added as an absolute value or percentage growth when needed and the Distribution Method can be selected as Match or M2M(+1).

### Example: Weighted Moving Average Forecast with Growth Component and Distribution Method as M2M

In this example, forecasting is done for the node 'Total Net Profit' for the year 2023 based on the *Sum of 2021* and the *Sum of 2022* series. Both the series have been given equal weights as 1 and 1 respectively along with 15% growth. Weights are also assigned for the period from January to June as 2 and the rest of the periods as 3. The Forecast Method applied in this example is the Weighted Moving Average with 'M2M' as the Distribution Method. It distributes the total to its periods based on the weighted moving average of all the Past Series Data. The image below shows the forecasting results based on the above configuration and the net growth is indicated as 15.1% in the **Results** section.

<figure><img src="/files/aWSnyCOyem9jQV3Jzm8c" alt=""><figcaption><p><strong>Weighted Moving Average Method</strong></p></figcaption></figure>

## 3. Linear Trend

The linear Trend method applies Linear Regression to predict the Target Node for the Target Period based on Past Data Series, their Weights and Source Periods.&#x20;

The linear regression method models a linear relationship between the forecast variable(dependent variable) and one or more predictor variables(independent variables). A linear regression model in its simplest form follows this equation:

&#x20;                                                                      **y=ax+b**, where,

**y**=forecasted variable (forecasted series)

**x**=predictor/input variable (past series)

**a**= regression co-efficient (measure of the effect of the predictor variable on the forecasted variable)

**b**= error term/noise

In our case, ValQ forecasts the new series based on the linear relationship model to the selected past series.

The growth component can also be included as an absolute value or a percentage increase or decrease if required and the Distribution Method can be selected as Match or M2M(+1) or M2M(+2).

### Example: Linear Trend Forecast with Growth Component and Distribution Method as Match

In this example, forecasting is done for the node 'Total Net Profit' for the year 2023 based on the *Sum of 2021* and the *Sum of 2022* series with weights as 1 and 2 respectively and 10% growth. The Forecast Method applied is the Linear Trend with 'Match' as the Distribution Method. The image below shows the forecasting results based on the above configuration and the Net Growth is indicated as 8.4% in the **Results** section.

<figure><img src="/files/vGKFhFHTXC63TiKtZUd6" alt=""><figcaption><p><strong>Linear Trend</strong></p></figcaption></figure>

Clicking on the **table icon** at the top right of the **Results** section displays the same results in a tabular format.&#x20;

<figure><img src="/files/KP8XbK4IPJ70aDrzDXB6" alt=""><figcaption><p><strong>Tabular view</strong></p></figcaption></figure>

Click **Apply** to apply the forecasted results to the series. Since the 'Total Net Profit' node is a complex formula, ValQ opens the Goal Seek window to select the input node you want to change.

<figure><img src="/files/EyGPr0pv9miC51dWCkrS" alt=""><figcaption><p><strong>Choose a Key Driver to change</strong></p></figcaption></figure>

Choose any one of the key driver nodes that you want to change, from the list displayed and click **Apply**.&#x20;

The forecasted series appears as shown below. Here 'Total Net Profit' is forecasted for the selected period with the selected past data series and weights, by changing the 'Units Sold' node. All the changed cells are highlighted in yellow.

<figure><img src="/files/yfzwJXFbyijVqxZpMCbX" alt=""><figcaption><p><strong>Forecasted Series</strong></p></figcaption></figure>

{% hint style="info" %}
**Learn more about Goal Seek in the** [**next section**](https://docs.valq.com/plan/pages/GAOnGGE0P17WMmvvqLXH#1.-goal-seek)**.**
{% endhint %}

{% hint style="info" %}

1. The following methods of forecas&#x74;**(ARIMA, Single/Double/Triple Exponential Smoothing)** can be used if there is a minimum of 3 years or 36 periods of data series.&#x20;
2. To apply these forecast methods, the data in the **Value** Field should be arranged in **descending order** before loading into the model, i.e. from the most recent year to the oldest year.
3. Customized Weights do not apply to these exponential smoothing methods as they already assign exponentially decreasing weights in their models.
   {% endhint %}

## 4. Auto Regression-Integrated Moving Averages (ARIMA)

Auto Regression-Integrated Moving Average method (ARIMA) is best for a short-term planning horizon. It consists of three parts.&#x20;

**Auto-regression:** Auto Regressive (AR) regression model is built on the autocorrelation concept, where the dependent variable depends on the past values of itself. Beta(ß) constant is used for Auto Regression.

**Integrated:** The integrated part of ARIMA attempts to convert the non-stationarity nature of the time-series data to a stationary one by performing prediction on the **difference** between any two pairs of observations rather than directly on the data itself.

{% hint style="info" %}
A stationary series is one whose statistical properties do not vary with time or not a function of time. Stationarity in Time Series also means series without a Trend or Seasonal components.
{% endhint %}

**Moving Averages:** It attempts to reduce the noise in the time series data by performing some aggregation operation to the past observations in terms of residual error. The primary Alpha(α) constant is used for Moving Average prediction.&#x20;

Thus it creates a 'model' for a given time series based on its past values, its lags and the lagged forecast errors and that equation can be used to forecast future values.&#x20;

The distribution method is M2M by default. After selecting the 3-year data series, select ARIMA method. Alpha(α) value should be provided in the box which is between 0.01 and 0.99. You can forecast without a growth factor by using *none*, or you can give the growth factor as an absolute *value* or in *percentage*.

### Example: Auto Regression-Integrated Moving Average Forecast with growth component

In this example, forecasting is done for the node 'Overall Result' for the year 2023 based on 2021, 2020 & 2019 actuals with the weight as 1 for all and 15% Growth. The forecast method used in this example is ARIMA and the Alpha value is given as 0.15. You can check or un-check the required data series in the Results section for a better view.<br>

<figure><img src="/files/iTIdPetJoOG8YHAfimgM" alt=""><figcaption><p><strong>ARIMA method</strong></p></figcaption></figure>

## 5. Single Exponential Smoothing(SES)

Single Exponential Smoothing method is the simplest of exponential smoothing techniques. It predicts short term baseline forecast and volatility accurately. This method uses only the level component Alpha(α) constant for forecasting. It is a ratio (or a percentage) of how much importance the model will allocate to the most recent observation compared to the importance of demand history. Hence, alpha is the smoothing factor. It is used as a Short-Term and Mid-Term planning horizon.

The distribution method used in this calculation is M2M by default. After selecting the 3 years data series, select Single Exponential Smoothing method. Alpha(α) value should be provided in the box and it must be between 0.01 and 0.99. You can forecast with no growth factor by using none, or you can give the value in percentage or as an absolute value. You can also assign weights to the data series. There is an option here to optimize the model so that you get the highest possible outcome in this forecast.

## 6. Holt's Method (Double Exponential Smoothing)

Double Exponential Smoothing method estimates both Level and Trend components of the series to forecast. Hence it uses two smoothing parameters Alpha(α) and Beta(ß) for the level and trend respectively. They have to be provided in the box given in Forecast Pop-Up. It is used for short, medium and long time planning horizon.

The distribution method used in this method is by default M2M. After the selection of 3 years data series, select Double Exponential Smoothing method and enter Alpha & Beta values. Both Alpha & Beta values must be between 0.01 and 0.99. You can enter the growth in percentage or as an absolute value if required. Also, there is an option to optimize the model which gives the highest possible outcome in this forecast that can be used to compare with other forecast values.

## 7. Holt-Winter's Method (Triple Exponential Smoothing)

Triple Exponential Smoothing method introduces seasonality components also along with level and trend components for a better and more robust forecast. A Holt-Winter's model is defined by its three order parameters, alpha, beta and gamma. Alpha specifies the coefficient for level smoothing. Beta specifies the coefficient for trend smoothing. Gamma specifies the coefficient for seasonal smoothing. So, the values for Alpha, Beta & Gamma should be provided in the box given in Forecast Pop-Up. It is used as a Long-Term planning horizon.

The distribution method used in this calculation is by default M2M. After the selection of 3 years' data series, select Triple Exponential Smoothing method and enter Alpha, Beta & Gamma values in the box. Alpha, Beta & Gamma values must be between 0.01 to 0.99. You can enter the growth in percentage or as an absolute value if required. There is an option to optimize the model which gives the highest possible outcome in this forecast that can be used to compare with other forecast values.

### Example: Single, Double & Triple Exponential smoothing Forecasts with Growth component in percentage

In this example, all the above exponential forecasting methods (Single, Double and Triple) have been applied for the node 'Overall Result' for the year 2023 based on 2021, 2020 and 2019 actuals. Find below the **sample** parameters used for these methods.

**Single Exponential Smoothing:**  8% Growth; Alpha = 0.99 (optimized form),

**Holt's Method:** 10% growth; Alpha = 0.35, Beta = 0.25,

**Holt-Winter's Method:** 10% growth; Alpha = 0.33, Beta = 0.33 & Gamma = 0.33.&#x20;

You can simultaneously compare the results of different methods in this way and click **Apply** on the desired method to create the required series.

<figure><img src="/files/WY4QV8wIOpGnp4fd4mNL" alt=""><figcaption><p><strong>Single, Double and Triple Exponential Smoothing methods</strong></p></figcaption></figure>


# Allocation Features

Let's explore the different features available for planning and allocations.

ValQ provides multiple options to operate on the node values for accurate and effective planning. Primarily, planners are provided with 3 major options.

## 1. [Goal Seek ](/plan/allocation-features/goal-seek)

It is applicable when you are trying to update a node value which is derived using a complex formula. Such nodes can be updated only by changing one of its key drivers/input nodes.

Whenever you click and try to change such cells, **Goal Seek** option is automatically enabled in the Action menu and you can select it.

<figure><img src="/files/KCe9QAqLKBMtFYCgrSxL" alt=""><figcaption><p><strong>Goal Seek</strong></p></figcaption></figure>

## 2. [Copy to Periods](/plan/allocation-features/copy-to-periods)

It is used to copy the value of a node to the remaining periods of the year- either as absolute copies or in an increasing/decreasing trend fashion.

<figure><img src="/files/QHsPgkpnmLFKq4KwyYA5" alt=""><figcaption><p><strong>Copy to Periods</strong></p></figcaption></figure>

## 3.[ Distribute](/plan/allocation-features/distribute)

Using Distribute, the total value of a node can be distributed horizontally to the periods of the year, as well as vertically to the descendant nodes (its dependencies).

<figure><img src="/files/CHEPGFsCg6voPZFPzSPj" alt=""><figcaption><p><strong>Distribute</strong></p></figcaption></figure>

The above Plan options are explained in detail in the upcoming sections.


# Goal Seek

Goal Seek feature is applicable when you want to update a node value that is derived using a complex formula, or has dependents/node references that use a complex formula. Such nodes can be updated only by changing one of its key drivers/input nodes.&#x20;

The **Goal Seek** button in the Action menu bar gets enabled automatically when you are trying to update a node that has a reference to a complex formula.

<figure><img src="/files/Z3ozRYSA77sNlNzOwQ1D" alt=""><figcaption><p><strong>Goal Seek</strong></p></figcaption></figure>

{% hint style="info" %}
In the above image, clicking on the *Clothing* node has enabled **Goal Seek,** despite its formula being ***Sum of Visible Children*** because one or more of its child nodes contain complex formulas(e.g. division, sum of products, etc.).
{% endhint %}

{% hint style="info" %}
This option is presented to the user automatically, in cases when you are forecasting for the nodes that involve complex formulas. In the below image, forecasting is done for the *Total Net Profit* node. Since it involves a complex formula, the user is prompted with the below pop-up window to choose the input node/changing node through goal seek.
{% endhint %}

<figure><img src="/files/JEXs2CKBDp0PuoU2C1sa" alt=""><figcaption><p><strong>Changing Key Driver for Forecasting</strong></p></figcaption></figure>

Forecasting is explained in the section: [Time Series Forecasting.](/plan/time-series-forecasting)

## Steps for Goal Seek

**Step 1:** Select the node you want to change and click **Goal Seek** from the Action Menu Bar. A pop-up window opens below the screen.

*Revenue* node of January is selected in the example below and **Goal Seek** is chosen.

<figure><img src="/files/yXJgUAgFRs7fuSkzCiHL" alt=""><figcaption><p><strong>Goal Seek for Revenue Node</strong></p></figcaption></figure>

**Step 2:** By default, **Goal Value, Target Node,** and **Period** fields are pre-filled based on the node selected. The user can change these values if required.

<figure><img src="/files/Tn1e1AAbBPamFbkLVkwZ" alt=""><figcaption><p><strong>Allocate by Goal Seek</strong></p></figcaption></figure>

**Step 3:** Enter the target value to be achieved in **Goal Value.** Here the Goal Value is set as 50000.&#x20;

<figure><img src="/files/6S3Venjt00ZJpZFwjMAn" alt=""><figcaption><p><strong>Enter Goal Value</strong></p></figcaption></figure>

**Note:** By clicking on the **Target Node** text box, **'Select a node'** pop-up opens in which you can select a different input node other than what you had chosen previously (for example, in this case *Revenue* node can be changed to a different node)

**Step 4:** From the **Period** dropdown list, choose *Total* if you want to change and distribute the total value. [**Distribute**](/plan/allocation-features/distribute) option is displayed if you select *Total*.&#x20;

<figure><img src="/files/Hb4PLvJQvcAJrtaTBIGk" alt=""><figcaption><p><strong>Distribute the Total after changing the Input Node</strong></p></figcaption></figure>

(or) choose *any month (Jan)* if you want to copy to the remaining periods. [**Copy to Periods**](/plan/allocation-features/copy-to-periods) option gets displayed if you choose a specific period.

<figure><img src="/files/9lhNivqXmo9Ku449n9nZ" alt=""><figcaption><p><strong>Copy to Periods after changing the Input Node</strong></p></figcaption></figure>

**Step 5:** Select the **Input Variable** from the list that appears on clicking it, whose change will result in achieving the goal value. The input variable selected in the example below is *Units Sold* node. The changed value of January is copied in an increasing trend of 10% to the remaining periods.

<figure><img src="/files/WumE2xQuX6YDRAgLoxpj" alt=""><figcaption><p><strong>Copy to Periods after changing the Units Sold Node</strong></p></figcaption></figure>

**Note:** To preview your change, click on **View Goal Values.**&#x20;

<figure><img src="/files/crnPNwXccQ0qYawXq8us" alt=""><figcaption><p><strong>Preview Goal Values</strong></p></figcaption></figure>

**Step 6:** Click **Run** to see the results and then Click **Apply** or continue performing goal seek until you get the desired result.&#x20;

<figure><img src="/files/K7pW3DkzNuBbEbSZ2pjH" alt=""><figcaption><p><strong>Run, Preview and Apply</strong></p></figcaption></figure>

Finally, the new series is created as shown below for the desired target node, by changing the input variable. All the changed cells are highlighted in yellow in the table grid.

<figure><img src="/files/qsUOSiEeGIyzjU0S4WQ7" alt=""><figcaption><p><strong>Updated Results with Goal Seek</strong> </p></figcaption></figure>


# Distribute

The total value of a node can be allocated horizontally (to its periods) or vertically (to its dependents) by way of Distribute.

## **1. Distribute Total to Periods (Horizontal Distribution)**

The value of a total node is distributed horizontally to its periods in the below examples. They can be done in two ways:

1.1. Distribute by Weights

1.2. Distribute Equally

## 1.1. Distribute by weights

The total value of the cell is distributed to its periods by its **initial** weights or by **customized weights** taken from a different node that you choose. The values can be replaced or appended.

### **Example 1: Distribute by Customized Weights by Replace**

Consider the data below.

<figure><img src="/files/ydivzeXfVP9gsWUEXQyl" alt="" width="563"><figcaption><p><strong>Before Distribution</strong> </p></figcaption></figure>

The total of the *East* node is changed from 30 to 120 and the Distribution option chosen here is '**Replace by Weights'** of the *Midwest* node.

<figure><img src="/files/8c6NK0eA51q4bcHhUMa2" alt=""><figcaption><p><strong>Weights taken from </strong><em><strong>Midwest</strong></em><strong> node by Replace</strong></p></figcaption></figure>

Since we chose Replace, the new total 120 itself is distributed based on the spread of the *Midwest* node (ratio of 1:2:3) by overwriting existing period values. The parent node's *Overall Result* also gets changed as a result of this action.

<figure><img src="/files/PwlgLRWSANzGw6HVBqvW" alt="" width="563"><figcaption><p><strong>After Distribution</strong></p></figcaption></figure>

### Example 2: Distribute by current weights by Append

For the same data, let us see what happens if we choose Append by current weights.

<figure><img src="/files/ydivzeXfVP9gsWUEXQyl" alt="" width="563"><figcaption><p><strong>Before Distribution</strong> </p></figcaption></figure>

<figure><img src="/files/GyHC9ObDQIvLAWrZmh0y" alt=""><figcaption><p><strong>Weights taken from </strong><em><strong>East</strong></em><strong> node (current weight) by Append</strong></p></figcaption></figure>

<figure><img src="/files/KDWsduylJDXE0zBiex9M" alt="" width="563"><figcaption><p><strong>After Distribution</strong></p></figcaption></figure>

As you can see, the delta value of 90 (120-30) only is distributed using their current weights yielding 40,40, and 40 (10+30, 10+30, 10+30).

{% hint style="info" %}
**Note:**

When you distribute a total value using the **current weights,** both **Replace** and **Append** options would yield the same results as both are logically the same when using the current weights.

So in the above example, using the Replace option instead of 'Append' would also give the same result.
{% endhint %}

## 1.2. Distribute Equally

The total value of the node can be equally distributed to periods.

### Example 1: Distribute Equally to Periods by Replace

In the below example, the new value of 120 in *Midwest* node is distributed to the three periods equally as 40,40 and 40 by replacing their old values.

<figure><img src="/files/oZGEmuhqcfRv9ovTfaYc" alt=""><figcaption><p><strong>Replace Values</strong></p></figcaption></figure>

<figure><img src="/files/hMimKfe12irWDvAZdFhn" alt=""><figcaption><p><strong>Distribute Equally By Replace</strong></p></figcaption></figure>

### Example 2: Distribute Equally to Periods by Append

For the same example explained above if we had chosen **Append Values**, you would get the below results. Only the delta value of 60 (120-60) is distributed equally to the three periods yielding 30,40 and 50.

<figure><img src="/files/VY511DVVSRyq8C2cBGOI" alt=""><figcaption><p><strong>Distribute Equally By Append</strong></p></figcaption></figure>

## 2. Nodes with Dependencies

In the case of nodes with dependencies, along with the weights being distributed horizontally, they are also distributed vertically to their dependents.

### Example 1: Distribute to Periods and Dependents by Current Weights and by Replace

Consider the data below.

<figure><img src="/files/ydivzeXfVP9gsWUEXQyl" alt="" width="563"><figcaption><p><strong>Before Distribution</strong> </p></figcaption></figure>

*Overall Result* node is changed from 90 to 270 and the new value 270 is distributed to **dependents** - *East* and *Midwest* nodes **as well as to the periods** based on their current weights.

<figure><img src="/files/b5tkN2TwxTgaWxzkSljO" alt=""><figcaption><p><strong>Distribute periods and dependencies by weights- by Replace</strong></p></figcaption></figure>

As seen from the image below, the new total of 270 is distributed between *East* and *Midwest* with their current weights of 1:2 respectively. Also, the period-wise distribution is based on their initial weights.

<figure><img src="/files/zcKsSyuPJa6xuj2NEXng" alt="" width="563"><figcaption><p><strong>After Distribution by Weights</strong></p></figcaption></figure>

### Example 2: Distribute to dependencies only - equally

You can distribute the total of a period node **only to its dependencies** without impacting other periods.

The example below shows such a case where the value of 6k in *Jan* node is distributed only to its dependencies equally. Its impact is carried over to the top nodes as well.

<figure><img src="/files/bC0nlFXuBkzeM4MjT8Ki" alt=""><figcaption><p><strong>Distribute equally</strong></p></figcaption></figure>

<figure><img src="/files/Pwdnh8SKDkzggmdY97xd" alt=""><figcaption><p><strong>Distribute equally to </strong><em><strong>Jan's</strong></em><strong> dependents</strong></p></figcaption></figure>

### Example 3: Distribute to dependencies only - with customized weights

In the below image, the desired series and period have been chosen through the **Select Series** and **Period** dropdown list from which the new weights would be derived. The value of 6k would be distributed accordingly only to its dependencies and up to the top.

<figure><img src="/files/Z6hQNw4stTzIS25NFT5B" alt=""><figcaption><p><strong>Distribute by customized weights</strong></p></figcaption></figure>

{% hint style="info" %}
The value can be appended or replaced. **Append** option adds the delta value to the present value while **Replace** overwrites the present value with a new value.
{% endhint %}

## 3. Distribute using the Distribute Dialog Box

**Distribute** is enabled in the Action Menu Bar whenever you click on a cell that has a total.

**Step 1:** Click on the required cell and click **Distribute** on the Action Menu Bar.&#x20;

<figure><img src="/files/zb0lepv4SN3gYjBQ7pYh" alt=""><figcaption><p><strong>Distribute</strong></p></figcaption></figure>

**Step 2:** In the dialog box, enter the total value you want. Choose to distribute it to the periods by weights or equally. In the example below, we are choosing to distribute equally.

<figure><img src="/files/akbfvcNL9poLZ2E88ADq" alt="" width="563"><figcaption><p><strong>Distribute Dialog Box</strong></p></figcaption></figure>

**Step 3:** If the node has dependencies, it provides another option where you can choose to distribute the new total to its dependents equally or by weights. You can also choose the series name from which the weights should be taken.

In this example, we are distributing by weights that are taken from *Plan Series 1*.


# Copy to Periods

**Copy to Periods** copies a node's period value (or new value if it is edited) to the future periods of that node. This action gets applied to the changing node's dependent nodes, if any.

The Copy feature is available in the following ways:

1. [Copy to all Periods in right](#1.-copy-to-all-periods-in-right)
2. [Copy with Trend Percentage](#2.-copy-with-trend-percentage)
3. [Copy with Trend Value](#3.-copy-with-trend-value)

{% hint style="info" %}
Copy to Periods option can be applied on the period nodes only (not on the total nodes as the total value can not be copied to individual months). It is also not applicable for the last period -e.g. December.
{% endhint %}

## 1. Copy to all Periods in right

The original value or the edited value of the selected node is copied to the subsequent periods till the end.

* In the Plan tab, click on the cell that is required to be copied. Use the right arrow that pops up. Select **Copy to right-> Copy to all periods in right.**&#x20;
* To edit a period's value and copy the edited value across the remaining periods, double-click on the cell and change the value you need.
* Without pressing Enter, select **Copy to right->Copy to all periods in right.**&#x20;

The new value takes the place of the existing value and then ValQ re-calculates the total based on the time aggregation set for the node.

In the below example, January month's *Cost of Sales* value of $2740 is changed to $1k. Without pressing Enter, click on the pop-up at the right and choose **Copy to all Periods in right.**

<figure><img src="/files/fGDWASI0MubpTlR7tE4s" alt=""><figcaption><p><strong>Copy Edited Value</strong></p></figcaption></figure>

The edited value is copied horizontally to the other periods along with a bottom-up distribution to the above nodes as highlighted in yellow in the below image.&#x20;

<figure><img src="/files/EQzsH9J2XDvjo3lcSjb5" alt=""><figcaption><p><strong>After Copying to Periods</strong></p></figcaption></figure>

{% hint style="info" %}
For nodes with dependents, check [here ](#nodes-with-dependents)to know how the copy option works with both top-down and bottom-up distribution.
{% endhint %}

## 2. Copy with Trend Percentage

The value of the selected period is copied to the remaining periods with a month-over-month increase or decrease in percentage.&#x20;

Click on any cell that is not a total. Choose **Copy to right-> Copy with Trend Percentage->**&#x45;nter the desired percentage trend you want.

<figure><img src="/files/GnMAyg7HnZcBTSkQ91MP" alt=""><figcaption><p><strong>Copy with Trend Percentage</strong></p></figcaption></figure>

<figure><img src="/files/KS13N5LEP0uhYDNR5OER" alt=""><figcaption><p><strong>After - Copy with Trend Percentage</strong></p></figcaption></figure>

## **3. Copy with Trend Value**

The value of the selected period is copied to the remaining periods with a month-over-month increase or decrease of a constant value.

Click on any cell that is not a total. Select **Copy to right-> Copy with Trend Value->**&#x45;nter the desired positive or negative value(month-over-month increase or decrease).

<figure><img src="/files/qxzOBLxTQsQM2qLoMPx2" alt=""><figcaption><p><strong>Copy with Trend Value</strong></p></figcaption></figure>

<figure><img src="/files/EHsTFkvEX7zdlj0Lx9Dy" alt=""><figcaption><p><strong>After - Copy with Trend Value</strong></p></figcaption></figure>

## Nodes with dependents

When there are dependent child nodes for a node, you will have additional options - **Allocate by current weight, Allocate equally** or **Customize Distribution** in the Copy to Periods dropdown. Here you can specify how the change should be distributed to its dependencies(top-down) **along with** copying to periods.

In the below image, *Expense* node has two child nodes and hence copying the new value not only copies it to the periods but also distributes the new value to its two child nodes-*Cost of Sales* and *Other Costs.*

<figure><img src="/files/XLDjt9B5K6n7FUc5lVwN" alt=""><figcaption><p><em><strong>Expense</strong></em><strong> node with dependents</strong></p></figcaption></figure>

## Example 1: Copy to periods and dependencies with current weights

The option shown below copies the new value of 6k (*Expense* node) to its remaining periods in the right as well as distributes it to its dependencies with current weights.

<figure><img src="/files/P8QCBQAquURv561SRYWL" alt=""><figcaption><p><strong>Copy and</strong> <strong>Distribute with current weights</strong></p></figcaption></figure>

## Example 2: Copy to periods and dependencies with customized weights

The option shown in the below example copies the new value of 6k (*Expense* node) to its periods and also distributes it to its dependencies, with customized weights derived from the series - *Plan Series 1 (*&#x63;hosen in **Select Series).**

<figure><img src="/files/s8ZVAOw4a98TPDTyIFPN" alt=""><figcaption><p><strong>Copy and</strong> <strong>Distribute with Customized Weights</strong></p></figcaption></figure>

## Using the Copy to Periods dialog box

For all the above options, alternatively, you can use the **Copy To Periods** dialog box.

**Step 1:** Click on any cell whose value you want to copy to other periods.

**Step 2:** Click the **Copy To Periods** option on the Action Menu Bar.

<figure><img src="/files/tXsVRc62jtfiIemyp52s" alt=""><figcaption><p><strong>Click 'Copy to Periods'</strong></p></figcaption></figure>

**Step 3:**  A dialog box appears. Here, you can enter the desired value.

<figure><img src="/files/ZfqpF3PNqaxp22c7HoTX" alt="" width="372"><figcaption><p><strong>Copy to Periods Dialog Box</strong></p></figcaption></figure>

**Step 4:** Choose if you want to just **Copy** or Copy with **Trend**. Copy copies the same values to all the remaining periods till the end, while Trend gives you further options.

**Step 5:** If you have selected **Trend**, choose whether the mode of increasing or decreasing trend should be in percentage or value.

<figure><img src="/files/G0wWEHIZrYkmGrx9agF3" alt="" width="370"><figcaption><p><strong>Copy with trend</strong></p></figcaption></figure>

**Step 6:** Use the slider or manually enter the values. Enter the percentage change in case of percentage mode or the incremental value in case of value mode and finally click **Apply.**

In the example, the *Expense* node value $3k is copied to the remaining periods with an increasing trend of 20%. Since the *Expense* node has dependents, its total is distributed according to the weights of periods in *Plan Series 1* as shown below.

<figure><img src="/files/r82J5Z6arzxoiMuPLH8Y" alt="" width="375"><figcaption><p><strong>Copied with 20% Increasing Trend and Distributed with Weights</strong> </p></figcaption></figure>


# Driver Based Planning

Driver Based Planning is an add-on approach to planning and budgeting apart from the conventional allocation features explained in the previous sections.

With this feature, planners explicitly identify the key business and value drivers, understand how they affect the KPIs, and then perform planning/budgeting by configuring these drivers.&#x20;

## Advantages of Driver-based Planning

1. Planners can create a transparent and defined planning/budgeting methodology that clearly explains how certain key operational drivers impact the KPIs. This simplifies your forecast model and facilitates clear communication to all the stakeholders.
2. Forecast demand, risk and opportunities over the long term. Efficient and precise forecasting is achieved by concentrating on the drivers that matter the most and getting rid of superfluous information.
3. Execute fast and flexible planning by changing key metrics in drivers and understanding the effect. You can also create multiple drivers for different periods.

Let us see the steps to configure the drivers and understand how this works in the upcoming sections.


# Enabling Driver Based Plan

You can choose to switch between the driver-based planning approach and the standard planning approach.&#x20;

To create a driver-based plan while adding a new plan series, check the option '**Enable Driver based Planning'** in the **Create a Plan** pop-up window.

<figure><img src="/files/RkcTWvRj0OcPTHcXWj7y" alt="Create a Plan with Driver based Planning" width="563"><figcaption><p><strong>Enable Driver Based Planning</strong></p></figcaption></figure>

You can also change to a driver-based plan mid-way through your standard planning cycle by clicking the menu shown below and selecting **Driver Based Plan**.

<figure><img src="/files/enh7QeyKdPD2AxFurTRJ" alt=""><figcaption><p><strong>Choose 'Driver Based Plan'</strong></p></figcaption></figure>

{% hint style="warning" %}
On the contrary, switching back to the **Standard Plan** from the driver-based plan deletes all the applied configurations in the series.&#x20;
{% endhint %}

After enabling driver-based planning, the plan window looks as shown below where you can configure the driver inputs.

<figure><img src="/files/OgstsKJz7eyZ6SLD24X7" alt=""><figcaption><p><strong>Driver Based Plan</strong></p></figcaption></figure>

You can click on the arrows to collapse/expand the driver inputs configuration columns for a better view.&#x20;

<figure><img src="/files/iEsdwde1YxotLycetFf1" alt=""><figcaption><p><strong>Collpase/Expand the driver configuration columns</strong></p></figcaption></figure>

{% hint style="info" %}
Driver configuration options are available only for the leaf nodes to avoid conflicts between the top-down and bottom-up distributions.
{% endhint %}

Now you can [configure the drivers](/plan/driver-based-planning/configuring-driver-inputs) as well as perform the [standard allocations](/plan/allocation-features) for your plan.

#### **Note:**

Nodes with driver-based inputs and nodes with one or more dependencies using driver-based inputs are disabled from the standard allocations or configurations.

In the below example, the *Transport Cost* node is disabled for any allocations as it already has a driver-based input (*HC* node) impacting it.

<figure><img src="/files/8L44eZa6WQQHDsu6gqpk" alt=""><figcaption><p>'<strong>Transport Cost' node has a driver based input</strong> </p></figcaption></figure>

*Company A* and *Overall Result* nodes are also disabled for configurations as their dependency node *Transport Cost* has a driver-based input. All other nodes can be configured or allocated as required.

<figure><img src="/files/7DOhYxUm4xMBZsb1bTIL" alt=""><figcaption><p><strong>Configuration disabled</strong> </p></figcaption></figure>

Subsequent driver based plans can be created newly or can be copied from existing plans.

To copy the driver configurations (and the values, if required) you can select the options as shown below while creating a plan.

<figure><img src="/files/rkWtsMJXcLI7N2Oy1tvX" alt="" width="563"><figcaption><p><strong>Copy a Driver Based Configuration</strong></p></figcaption></figure>


# Configuring Driver Inputs

Let us now see the steps to configure the drivers. The following options are available for configuration.

### **Driver**

This column lets you choose the drivers for the required nodes. The drivers can be chosen either from the current series or from any other data/plan series.

<figure><img src="/files/NzkvbiaWz592fyRdBcQG" alt=""><figcaption><p><strong>Configuring Driver</strong></p></figcaption></figure>

### **Driver Method**

This column lists the different ways in which you can link the node and the driver according to the input value.

<figure><img src="/files/IZVocA3kOyKp5GRhJTtK" alt=""><figcaption><p><strong>Driver Methods</strong></p></figcaption></figure>

Depending on the driver method selected, the node values are expressed in terms of the **driver** and the **input value** for all periods.

<table><thead><tr><th width="209">Driver Method</th><th>Explanation</th></tr></thead><tbody><tr><td>Multiplication</td><td>This multiplies the driver value and the input value.</td></tr><tr><td>Division</td><td>This divides the driver value by the input value.</td></tr><tr><td>Addition</td><td>This adds the driver value and the input value.</td></tr><tr><td>Subtraction</td><td>This subtracts the input value from the driver value.</td></tr><tr><td>Percentage of</td><td>This represents the node values as a percentage of the driver, specified in the input value column.</td></tr><tr><td>Growth by</td><td>This represents the node values as the growth rate of the driver. The growth rate is entered in the input value column.</td></tr></tbody></table>

### Input Value

In this column, you can enter the required numerical value.&#x20;

Driver methods like multiplication, division, addition and subtraction accept absolute numbers as input values.

<figure><img src="/files/Bq5whZStCbYQYGesj9gb" alt=""><figcaption><p><strong>Input Value as number</strong></p></figcaption></figure>

The 'percentage of' and 'growth by' methods automatically accept the numbers in a percentage format.

For the 'Growth by' method, the growth rate can either be an absolute number or in percentage. The percentage increase or decrease is specified by entering positive or negative numbers in the input value column respectively.

<figure><img src="/files/q6oeoAf8ZKQ74ErRlRQW" alt=""><figcaption><p><strong>Input Value as percentage</strong></p></figcaption></figure>

### Example 1

Suppose you want to configure the transport cost based on the headcount in the organization for Company A. Let us assume the transport cost is $1000 per head.

1. Within ***Company A***, click on the 'Select' dropdown in the **Driver** column beside the node *Transport Cost.*&#x20;
2. It has two dropdown lists. Click on the first dropdown list and pick the series from which you want to choose the driver values. For instance, let us choose 'Current Series'.

<figure><img src="/files/vUhWd5L2qOwetZqh7sFb" alt=""><figcaption><p><strong>Select the Series</strong></p></figcaption></figure>

3. Click on the second dropdown list to choose the 'HC' node as the driver for the 'Transport Cost' node. Ensure that you choose the HC node of the respective company/lineage.&#x20;

<figure><img src="/files/nlocBfjK66dthyXrNjow" alt=""><figcaption><p><strong>Select the Driver</strong></p></figcaption></figure>

**Note:** You can click 'Reset to Default' to clear the choice and start configuring again.

4. Since the headcount is a factor for the transport cost, the **driver method** is selected as 'Multiplication'.
5. Per head transport cost is given as the **input value**. Click on the input value cell, key in the number '1000' and then press enter to input the value.

<figure><img src="/files/mXuVOG21u1EFlXcpAlIF" alt=""><figcaption><p><strong>Driver Configured</strong></p></figcaption></figure>

Now you have configured a driver for the transport cost. In the same way, you can configure as many drivers as required in your plan.

### Distribution Method

The new total of the driver nodes (leaf nodes) can be distributed by their current weight or equally or can be custom distributed. These three options are available in the distribution method as shown below.

<figure><img src="/files/PYToIxxHxa9XP4rMhbPc" alt=""><figcaption><p><strong>Distribution Methods</strong></p></figcaption></figure>

The value to be distributed is entered in the **Input Value** column and then the distribution option can be chosen.

Distribution can be done for any of the leaf nodes with or without the driver input configuration. Find below the examples for the same.

### Example 2

The below example shows the new value of sales ($140m) being distributed to the periods equally. The *Sales* node and the corresponding result nodes at the top are disabled for further allocations.

<figure><img src="/files/rj4Vnbb8oBsQISpsuEv0" alt=""><figcaption><p><strong>Equal Distribution</strong></p></figcaption></figure>

### Example 3

In this example, the *Other Revenue* node is driven by a percentage of the driver node which is the *Sales* node.

By default, the total is distributed by current weights as shown below.

<figure><img src="/files/mpbZPYhZ7phk3qPi0fhH" alt=""><figcaption><p><strong>Other Revenue is driven by Sales node</strong></p></figcaption></figure>

&#x20;It can be custom-distributed if required.&#x20;

<figure><img src="/files/4JcPvFVvsqUByI4QtOFM" alt=""><figcaption><p><strong>Custom Distribution</strong></p></figcaption></figure>

{% hint style="info" %}
Distribution of the total is applicable only for the 'percentage of' and 'growth by' driver methods. This is because other arithmetic methods (Addition, Subtraction, Multiplication and Division) perform period-wise calculations first and then aggregate the total.
{% endhint %}

To configure a bunch of drivers simultaneously, you can use the Bulk configure option which is explained in the next section.&#x20;

We'll also explore the configuration of template key drivers and other features in the upcoming sections.


# Bulk Configuration of Drivers

### Configuring drivers for multiple nodes

1. To configure drivers for multiple nodes at once, click **Configure Drivers->Bulk Configure.**&#x20;

<figure><img src="/files/H9jPiPcuToQx3O4zEWCx" alt=""><figcaption><p><strong>Click 'Bulk Configure'</strong></p></figcaption></figure>

2. Check on the required nodes to select them all together as shown below.&#x20;

<figure><img src="/files/wC099tzWTd4oc80Cy7Ji" alt=""><figcaption><p><strong>Select the nodes to configure</strong></p></figcaption></figure>

3. Click on the **Editor Driver Inputs** option in the menu bar at the bottom of the screen which opens the Bulk Edit window.

<figure><img src="/files/HFX4hNAF3PAUzODZS5mu" alt=""><figcaption><p><strong>Click on 'Editor Driver Inputs'</strong></p></figcaption></figure>

4. In the window, you can configure the driver, the driver method, the input value type and the distribution method (if applicable) for the drivers selected. Click **Apply.**

<figure><img src="/files/LpfFgBGeTBTqehVBVpN9" alt=""><figcaption><p><strong>Bulk Edit</strong></p></figcaption></figure>

This way, multiple nodes can be configured simultaneously with the same driver and the driver method. The input values can then be entered for each of the nodes separately as required.

### Configuring Template Nodes

For models consisting of templates, driver configuration for the template nodes can be done using this option.&#x20;

The user is given a pop-up window to configure the template nodes once, after which ValQ automatically assigns the respective driver nodes for each level based on the lineage.

i.e., suppose the *Sales(*&#x6E;ode) is the driver of the *Other Income* template node. By configuring it only once as shown in the below example, all the regions' respective *Sales* node is configured as the driver for the corresponding region's *Other Income* node.&#x20;

1. Click **Configure Drivers->Configure Driver in Template.**

<figure><img src="/files/PGoBs6p0Bgw3U1jDI66W" alt=""><figcaption><p><strong>Configure Driver in Template</strong></p></figcaption></figure>

2. A pop-up window that contains all the templates and template nodes in the model opens.

<figure><img src="/files/jyW5WROwmGWoGFlULwrK" alt="" width="563"><figcaption><p><strong>Template nodes</strong> </p></figcaption></figure>

3. Configure the driver inputs for the required template nodes by keying in the driver node name, the driver method, the input value, and the distribution (if applicable).

<figure><img src="/files/3PmjjN9WvD4CuKHIrmO3" alt="" width="563"><figcaption><p><strong>Driver Based Inputs for Template</strong></p></figcaption></figure>

4. Click **Apply.** All the template nodes would be configured at once, based on their respective source keys as shown below.

<figure><img src="/files/lN2uCiSZA16HLEHCfwSq" alt=""><figcaption><p><strong>Driver configuration for template nodes</strong> </p></figcaption></figure>

{% hint style="info" %}
Can I use the Bulk Configure option for the template nodes? What is the difference between bulk configure and configure driver in template?

**-Bulk Configure** configures multiple nodes (similar or different named nodes), with **the same driver from the same series and lineage.**

-Use the **Configure Driver in Template** option to specifically configure template nodes. This ensures that **the driver nodes are chosen from their respective lineage.**
{% endhint %}

### Reset Drivers and Values

1. To reset all the driver configurations, choose **Configure Drivers->Reset->Reset Driver.**&#x20;
2. To reset only the input values configured in the driver while retaining other information, choose **Configure Drivers->Reset->Reset Values.**

<figure><img src="/files/rsU2hArvdczAXBYMJgyI" alt=""><figcaption><p><strong>Reset</strong> </p></figcaption></figure>

3. To reset the driver inputs in the template nodes, choose **Configure Drivers->Reset->Reset Template.**&#x20;

<figure><img src="/files/ZBGyTzEmtuWJpHnpNdld" alt=""><figcaption><p><strong>Reset Template</strong></p></figcaption></figure>

* Choose the required nodes and click **Reset** which resets the driver configurations in the selected template nodes. Check **Reset Only Values** to reset only the input values.

<figure><img src="/files/TqpD4caWjPJmH9LwDk7P" alt="" width="375"><figcaption><p><strong>Reset Template Node Drivers</strong></p></figcaption></figure>


# Plan Interface

The Plan tab consists of 3 sections - Action Menu bar at the top, data table grid and the bottom pane.&#x20;

Allocation features available on the data grid and driver-based planning have been explained in the previous sections. Let's now explore the Action menu bar and the bottom pane which has additional options to fine-tune your plan series.

## Action Menu Bar

<figure><img src="/files/NcIFNOHeB69mKYm62336" alt=""><figcaption><p><strong>Action Menu Bar</strong></p></figcaption></figure>

### 1. Standard Plan/Driver Based Plan

Switch between standard planning and driver-based planning using this menu option.

<figure><img src="/files/9YZng1X8vMIMVUr5ewCh" alt=""><figcaption><p><strong>Standard Plan/Driver Based Plan</strong></p></figcaption></figure>

Allocation features used for a standard plan as well as the driver based planning have been explained in the previous sections.

### 2. Forecast

It is used to perform [Time Series Forecasting](/plan/time-series-forecasting) as explained in the previous sections.

<figure><img src="/files/vndkGFD1m8agcP9yY8PZ" alt=""><figcaption><p><strong>Forecast</strong></p></figcaption></figure>

### 3. Copy to Periods

This is explained under [Allocation Features](https://docs.valq.com/plan/pages/GAOnGGE0P17WMmvvqLXH#2.-copy-to-periods).

<figure><img src="/files/QHsPgkpnmLFKq4KwyYA5" alt=""><figcaption><p><strong>Copy to Periods</strong></p></figcaption></figure>

### 4. Distribute

You can distribute total value to periods and/or dependencies equally/ by weights. Check [this section](/plan/allocation-features) to know more.

<figure><img src="/files/CHEPGFsCg6voPZFPzSPj" alt=""><figcaption><p><strong>Distribute</strong></p></figcaption></figure>

### 5. Goal Seek

Goal Seek is already explained in the section: [Goal Seek](/plan/allocation-features/goal-seek).

<figure><img src="/files/KCe9QAqLKBMtFYCgrSxL" alt=""><figcaption><p><strong>Goal Seek</strong></p></figcaption></figure>

### 6. Lock/Unlock Cell

Click on any cell, row, or column that you want to lock. Then click the **Lock** option in the menu bar. Locked cells do not get affected by any of the allocation methods.&#x20;

<figure><img src="/files/UqZ4QyOeA17niIBfI1DP" alt=""><figcaption><p><strong>Click 'Lock'</strong></p></figcaption></figure>

In this example, *US* node is locked which is indicated by its graying out and lock symbol. *US* node and all its children would be unaffected by any allocations that would be done in the future.

<figure><img src="/files/4dTmG4Qhw4Yw1QZNPM7m" alt=""><figcaption><p><strong>Locked cells are greyed out</strong></p></figcaption></figure>

To unlock, simply click on the locked cells and select **Unlock.**

You can also lock or unlock by clicking the lock icon in the action column as highlighted in the below image.

<figure><img src="/files/VgSIOELOUttR6nRPiEgx" alt=""><figcaption><p><strong>Unlock Cells</strong></p></figcaption></figure>

### 7. Number Formatting

It is used for changing the scale and to increase or decrease decimals for nodes whose **Scale** property is set as *User selected*.

<figure><img src="/files/DdoGc2DeO0xvhtoqzVXG" alt=""><figcaption><p><strong>Number Formatting</strong></p></figcaption></figure>

### 8. Reset

Reset is used to undo the last change made. Click **Reset** and a confirmation to revoke the last made change appears which you can confirm or cancel.

<figure><img src="/files/fMsFT6tIcMrjoQU9djjc" alt=""><figcaption><p><strong>Reset Last Change</strong></p></figcaption></figure>

Use the drop-down arrow next to it to click **Reset All** which clears all the performed changes and resets to the initial state of the plan series.

<figure><img src="/files/sDJkY2doGhBMPgYxANPH" alt=""><figcaption><p><strong>Reset All</strong></p></figcaption></figure>

### 9. Logs

It preserves a log of all the changes made to the table along with the date and time of change.&#x20;

Click **Logs** to open the logs. You can search, view, select and highlight, or delete the specific changes in the log. Click on **Clear Logs** to clear all the logs.

<figure><img src="/files/rRGEsxi4ZIuSVRS3yeEQ" alt=""><figcaption><p><strong>Logs window</strong></p></figcaption></figure>

### 10. Notes

Select any cell and click **Notes** to add new notes. After adding a note, click **Save** to save it.

<figure><img src="/files/5toHAgK2d8MNZuEi2KBE" alt=""><figcaption><p><strong>Add Note</strong></p></figcaption></figure>

Cells with added notes are distinguished from other cells by a triangular mark at the top right corner as shown below. On hovering your mouse over the cell, you can view, edit or delete the notes.

<figure><img src="/files/6P3qYBlAnAOAW1Js7UyN" alt=""><figcaption><p><strong>View, edit or delete notes</strong></p></figcaption></figure>

To view all the added notes at once, click the **Show All Notes** option from the Notes menu.

<figure><img src="/files/DyLzeCMzFKZvMxtGfe67" alt=""><figcaption><p><strong>Show All Notes</strong></p></figcaption></figure>

Here, you can search, edit, or delete the added notes.

<figure><img src="/files/gsA3H3ZFpAONk7FN6ult" alt=""><figcaption><p><strong>All Notes - window</strong></p></figcaption></figure>

### 11. Export to Excel

Export the plan series to Excel using this option <img src="/files/64cn2nZ3So8PvBK7ZZhg" alt="" data-size="line">.

<figure><img src="/files/6p8e7ML8NS2pH9AiskBA" alt=""><figcaption><p><strong>Export</strong></p></figcaption></figure>

### 12. Refresh Data

In case of any changes to the input data, **Refresh Data** can be used to update the plan report as that of the source data. On refresh, the plan gets updated and the allocation performed on the plan gets re-applied to the recent data.

<figure><img src="/files/xGi00MiyNkAKlOdWJzVu" alt=""><figcaption><p><strong>Click 'Refresh Data'</strong></p></figcaption></figure>

On clicking **Refresh Data**, a confirmation pop-up appears.&#x20;

<figure><img src="/files/39VApcV2peHmxFFtrbZT" alt="" width="563"><figcaption><p><strong>Confirm Refresh Data source</strong></p></figcaption></figure>

Click **Confirm** to re-run the calculations on the recent data.

{% hint style="info" %}
**Refresh Data** option is available only when the user chooses to keep the source data in the report (Checked '**Keep Source Data in Report'** option).
{% endhint %}

### 13. Settings

Click on this option to update the closed period. This option lets the user update the actuals, close the current period and update the active/open periods.

<figure><img src="/files/NronbPBcfjeblLDUHRcg" alt=""><figcaption><p><strong>Settings</strong></p></figcaption></figure>

### 14. Search

Search for any node on the model by clicking the **Search** bar. After clicking, enter the text using which you want to search the nodes. The search result nodes are highlighted and the results dropdown displays the results which navigates to the highlighted nodes.

<figure><img src="/files/uKjT6SfL2VL6ELarSHaU" alt=""><figcaption><p><strong>Search</strong></p></figcaption></figure>

### 15. Filter&#x20;

The **Filter** icon <img src="/files/Q8iQEzEc4kQeiMbYuAsz" alt="" data-size="line">can be used to perform a condition-based search on the model. Multiple filter criteria can be provided by the user to perform advanced searches across different node properties. To add multiple criteria, click the **Add Filter** option and choose between AND or OR conditions.

**Disable All** can be used to toggle between the states of filter and no filter. **Clear All** will delete all the applied filters.

<figure><img src="/files/Ehw9j71O9qiC8iLjZAIv" alt=""><figcaption><p><strong>Filter</strong></p></figcaption></figure>

### 16. Autofit

You can auto-size the tabular columns to fit the visual window size for a better view by clicking on the Auto Fit icon.

<figure><img src="/files/jRMmZlvS3fLvw2fbDpbR" alt=""><figcaption><p>Auto-fit</p></figcaption></figure>

### 17. Display Settings

It has options to hide/unhide the Actions column as well as hidden nodes.

<figure><img src="/files/P9MfraDbbmYgR0eBMFA3" alt=""><figcaption><p><strong>Display Settings</strong></p></figcaption></figure>

### 18. Formula Bar

It shows the formula or the number contained in the selected cell.

<figure><img src="/files/CyHxWabiFFFR1TrD3W9s" alt=""><figcaption><p><strong>Formula Bar</strong></p></figcaption></figure>

## Actions Column

Some of the frequently used actions like viewing node properties, log, node preview, lock/unlock, edit node, add and delete node options are available in this column beside each node that pops up when you hover your mouse over it.

<figure><img src="/files/Oc7MztEOpowsZeeZAyXz" alt=""><figcaption><p><strong>Actions Column</strong></p></figcaption></figure>

## Bottom Pane

It contains the information about the total number of nodes, last applied change, tab container with all the plan series tabs and **+ (Add New Series)** icon to add new plan series.

<figure><img src="/files/vftGg5ayaSGlDvbHBQ1T" alt=""><figcaption><p><strong>Bottom Pane</strong></p></figcaption></figure>


# Simulate

Visualize the model in hierarchical tree or table, Run Simulations on-the-fly and Present them as interactive charts

Simulations help businesses make informed decisions by testing out different scenarios and seeing the results. ValQ helps users create and compare multiple scenarios, perform in-depth scenario analysis, and visualize and present them to their team.

<figure><img src="/files/cF92iryasIx8VhEn82A9" alt="Simulate Tab showing a sample tree model "><figcaption><p><strong>Simulate Tab showing a sample tree model</strong> </p></figcaption></figure>

### **Highlights of the Simulate tab:**

* Simulate on the fly and perform a what-if analysis
* Create and compare multiple scenarios
* Assign important nodes as KPIs and key inputs to track progress
* Identifying the key drivers of performance
* Evaluate performance against a benchmark
* Present the simulation results for multiple scenarios
* Add notes for your reference.&#x20;
* Comment, Share and Collaborate with your team
* Export the scenarios to other BI sources for analysis
* Write back data and comments to the source(files, SharePoint, databases, etc.)

{% hint style="info" %}
Comments, Collaboration, Export, and Writeback features are available in ValQ Enterprise Edition
{% endhint %}

Let us see the steps to create and manage scenarios for effective value driver planning and the insights we can gain from it.


# Create a Scenario

Scenarios are particularly useful when you want to perform what-if analysis on the model, and you can save each instance as an individual scenario. This way, you have multiple scenarios to analyze and conduct scenario analysis.

{% hint style="info" %}
A scenario can have a single driver node or multiple driver nodes simulated at once.
{% endhint %}

{% hint style="info" %}
To simulate multiple combinations of drivers and evaluate their possible outcomes by adding, removing, or combining the required combinations, you can use initiatives within a scenario. To learn more, click [here.](/simulate/create-initiatives-in-a-scenario)
{% endhint %}

## 1. Create a Scenario

On opening the Simulate tab, the default scenario named **Scenario 1** is available without any simulations performed on it.

To create a new scenario, click on the **+ Add New Scenario** option.

<figure><img src="/files/mTw7T4fmfOaE1otC2sjV" alt="Create a Scenario"><figcaption><p><strong>Create a Scenario</strong></p></figcaption></figure>

This opens the **Create New Scenario** pop-up window where you can enter a title for your scenario and select the baseline series on which the simulations will be performed. Click **Create** which opens the new scenario.

<figure><img src="/files/o0k6vap3KubXny3rpuyY" alt="" width="344"><figcaption><p><strong>Click 'Create'</strong></p></figcaption></figure>

<figure><img src="/files/bSQcJLfYk5qU0dn3LCTR" alt="Scenario 2 is created"><figcaption><p><strong>Scenario 2 is created</strong></p></figcaption></figure>

You can now perform your desired simulations here. To learn more about managing the scenarios that you have created, click [here](/simulate/manage-scenarios).

{% hint style="info" %}
Scenarios are not stored as data series that can be used for further planning and analysis. Use the [Plan](/plan) Tab for such cases.

A plan series can however be simulated on the Simulate tab as a baseline or as a comparison.
{% endhint %}

## 2. Views

With ValQ, you can build a model of your business process and view it in the form of a tree as well as a table.

<figure><img src="/files/dr7bRsmIsDzOCxVZDfHq" alt="Click the required icon to switch between the views"><figcaption><p><strong>Click the required icon to switch between the views</strong></p></figcaption></figure>

Toggle between the below icons present on the top right corner of the canvas to change the view.

<div align="center"><figure><img src="/files/r32czkR2yLAmzfXmMSfI" alt="" width="40"><figcaption><p><strong>Click this for Table View</strong></p></figcaption></figure></div>

<figure><img src="/files/wvGIwJHoMS7TsTfAKWGi" alt="" width="42"><figcaption><p><strong>Click this for Tree View</strong></p></figcaption></figure>

### 1.1. Tree View

The tree is presented in a horizontal format as a visual. Its structure begins with a single node called **Top node/ Root node** and this node then branches out to other nodes as **children/ descendants**.

In the below image, the model is segmented into levels starting from level 1 with the Top node named 'Total Net Profit'. The nodes share a parent-child relationship at each level. For example, the 'Total Net Profit' node is the Parent node while 'US' node, 'Asia' node and 'Europe' node are its child nodes. Similarly, the 'US' node is the parent of 'Clothing' and 'Beverages' nodes and so on.

<figure><img src="/files/ZHfXeePXQDrNUAX0GFYd" alt=""><figcaption><p><strong>Tree Model</strong></p></figcaption></figure>

Click on **>** to expand and **<** collapse levels. Following are the options available to search and drill through the model.

* **Go to level** option to navigate between different levels.
* **Search** option to search and get to a particular node.
* **Zoom** icon to zoom in/out of the canvas.
* Full or minimal view option for the nodes.

<figure><img src="/files/vfxNd14EsI5HvX5M387S" alt="Display Options &#x26; Navigating to the Nodes"><figcaption><p><strong>Display Options &#x26; Navigating to the Nodes</strong></p></figcaption></figure>

### 1.2. Table View

The same information can be viewed in tabular form as seen in the image below. The total value of a node can be simulated on the Table view to view the results. This view is preferred if you want to see more details about the nodes especially the simulation impact and the variances **at the period level.**&#x20;

Click on the table icon <img src="/files/3GhZ97wsGQ4VNUyeO5eH" alt="" data-size="line"> to go to the Table View. Observe the simulation slider available on Total cell of 'Other Income' node.

<figure><img src="/files/OHlEnA0ZeHpVGk5kW0GZ" alt="Table View"><figcaption><p><strong>Table View</strong></p></figcaption></figure>

Table View also has **Search** and **Filter** options to search for and filter the required nodes.&#x20;

<figure><img src="/files/VU7IJvQCvlBaG3TxfFIU" alt=""><figcaption><p><strong>Search and Filter</strong></p></figcaption></figure>

## 3. Manage View

In both tree and table views, you can display or hide a few details like variance, variance%, simulation impact%, trendlines, conditional formatting, secondary KPIs, etc. using the **Manage View** option at the top of the toolbar.

<figure><img src="/files/rmPczc22o4N39fGHzWoi" alt=""><figcaption><p><strong>Manage View - Tree View</strong></p></figcaption></figure>

<figure><img src="/files/Rd2z5RyOJH0JCyo2hsHH" alt=""><figcaption><p><strong>Manage View - Table View</strong></p></figcaption></figure>

You can also view the simulation results for the full year or the simulation period from this menu. Click [here ](https://docs.valq.com/simulate/pages/mvRvAD7RkS13NSLAhFXT#id-5.-manage-view)to learn more about it.

In the next section, we'll see how to simulate the scenarios.

{% hint style="info" %}
If you want to understand the components present in the node, you can refer to this section: [Understanding the Node Components.](/simulate/understanding-the-node-components)
{% endhint %}


# Perform Simulations

ValQ provides two ways to model the simulation outcomes for your ‘what-if’ questions.

1. [Using the Simulation Slider](#1.-using-the-simulation-slider)
2. [Manual Input](#2.-manual-input)

## 1. Using the Simulation Slider

Using the simulation slider is an intuitive way to simulate the nodes. The slider is available for all the simulation methods such as Change%, Growth% and Constant.

### 1.1. Tree View

In tree view, hover over the desired node to reveal a slider. Clicking and dragging the slider changes the value in the cell. It also shows a percentage change with an up or down arrow as you keep moving the slider to the right or the left. The values and the total get updated once you release the slider.

<figure><img src="/files/dTrSPvreiv0GI3zgIXlt" alt="" width="375"><figcaption><p><strong>Use the</strong> <strong>Simulation Slider</strong></p></figcaption></figure>

Another way of interacting with the slider is using the text box next to it.

Just hover over the node and click on the text box beside the slider. Enter the required simulation percentage in the box. E.g. For a percentage increase in total value, enter positive values such as 10 or 10% and for the percentage decrease you can use negative values like -5 and so on.

In the below image, the 'Cost of Sales' node is decreased by 5%.

<figure><img src="/files/gP9qNJU9fA6vXovCMKNq" alt="" width="375"><figcaption><p><strong>Cost of Sales simulated to decrease by 5%</strong></p></figcaption></figure>

#### Simulation results are represented in the following ways:&#x20;

* The impact of simulation rolls up all the way to the top node and all these impacted nodes are highlighted in blue for a while.
* Display of change percentage above the nodes with an up or down arrow indicating the %increase or %decrease respectively.
* Conditional formatting (color indication) on the nodes based on their variances/values.
* Trendlines in the nodes are updated dynamically based on the new variances.
* The KPI ribbon at the top shows the new variances and the simulation impact on the KPIs.
* Variance, Variance% and Simulation Impact% on the nodes get changed.
* Display of simulation summary at the top that stacks all the simulated nodes with simulation percentage.

{% hint style="info" %}
Conditional formatting of the nodes, Trendlines and Secondary KPIs can be shown or hidden as required using the **Settings** menu at the top right corner of the canvas.
{% endhint %}

### 1.2. Table View

The slider is also available in Table View for all the total value cells when you click on them. As you click, a slider pops up. Click and drag the slider to change its value.

<figure><img src="/files/lgaLHPnxTB5F0vkMr7xv" alt=""><figcaption><p><strong>Simulation Slider in Table View</strong></p></figcaption></figure>

{% hint style="info" %}
Table view has an Actions column which contains frequently used options like view node details, add note, simulation disabled icon, edit node and add or remove KPIs/ key inputs.
{% endhint %}

<figure><img src="/files/mExUR98OA2ZYwGj2mHSz" alt=""><figcaption><p><strong>Options in Actions Column</strong></p></figcaption></figure>

You can also click on the pencil icon beside the slider to open the text box in which you can enter the simulation value in percentage.

#### Simulation results are represented in the following ways:

* Impacted cell values are highlighted in blue.
* Change the percentage beside the highlighted cells indicating the %increase or %decrease.
* The slider symbol is displayed in the Actions column of the table for the nodes on which the simulation has been performed.
* Conditional formatting (color indication) beside the cells based on their variances/values.
* Updated Trendlines showing the original and the simulated variances.
* The KPI ribbon at the top shows the new variances and the impact of simulation on the KPIs.
* Variance, Variance%, Simulation Impact and Simulation impact% are displayed on the table when you enable them.
* Display of simulation summary at the top that stacks all the simulated nodes with simulation percentage.

{% hint style="info" %}
Choose to display or hide the Trendlines, variance and its percentage, Simulation impact and its percentage, conditional formatting and cell highlights by using the **Settings** menu at the top right corner of the canvas.
{% endhint %}

## 2. Manual Input

Manual Input can be used to input a specific value as a simulation to the node. This action is allowed at both total as well as at period level for nodes that have simulation enabled on it.

### 2.1. Tree View

To edit or manually input the simulation value on a node, click on the **Edit Simulation** icon that is available next to the slider.

<figure><img src="/files/PIlgt9bZRswIqCcHoHrP" alt="" width="375"><figcaption><p><strong>Manually Input / Edit Simulation</strong></p></figcaption></figure>

This opens a grid consisting of the total node value and the period values where you can double-click on any of the cells (total node/ variation % /individual period) to enter a new value or use expressions like +20% or +10k to edit them, similar to the in-cell editor of the [Table View](#2.2.-table-view). The Bin icon is used to reset the simulation of the particular node.

<figure><img src="/files/p9kAL8CC93LMHNo0WFNF" alt=""><figcaption><p><strong>You can manually input a period's value to simulate</strong></p></figcaption></figure>

You can also click on the **Edit** icon at the top to open this table. Clicking this icon displays a table of all the simulated nodes **at once** where you can view/edit them at the period level.

<figure><img src="/files/hE0H3hSfsRDPOMZdWlnE" alt=""><figcaption><p><strong>Edit Simulation</strong></p></figcaption></figure>

The Simulation results shown are discussed [here ](#simulation-results-are-represented-by-the-following-ways)already.

{% hint style="info" %}
The Simulation method is change% by default. It can be changed to growth%, constant values, etc. on the [Node Settings window](https://docs.valq.com/simulate/pages/XZI8iAj4AfUR6AwSnFil#3.1.-simulation-method).&#x20;
{% endhint %}

### 2.2. Table View

In the table view, double-click on the total value or on the individual period values to edit the old value to a new one. ValQ also allows to enter expressions with scaled values (e.g., 11250 + 0.5k) and percentages (e.g., 11250 - 10%).

<figure><img src="/files/IBUPzopBP106wDVuOWp4" alt=""><figcaption><p><strong>Manually edit / input to simulate</strong></p></figcaption></figure>

You can also click on the required cell, then go to the **formula bar** and edit to a new value.

<figure><img src="/files/OYc9F5ZF5nA7vCBajhAe" alt=""><figcaption><p><strong>Formula Bar</strong></p></figcaption></figure>

You can also use keyboard shortcut keys to copy-paste the cell values within the table view to simulate.

<figure><img src="/files/8YVWGgu0EL2mqV55TnvK" alt=""><figcaption><p><strong>Copy-Paste</strong></p></figcaption></figure>

The Simulation results that will be displayed are discussed [here ](#simulation-results-are-represented-by-way-of)already.

{% hint style="info" %}
**Note:**

For an in-depth analysis of scenarios and simulation results, check this section: [Node Scenario Analysis.](/simulate/scenario-analysis-by-node)
{% endhint %}

{% hint style="info" %}
The effect of simulation performed on a node can be seen only on the levels above the simulated node. It does not impact the descendant nodes. To achieve both bottom-up and top-down implementations, you can use the [Plan Tab.](/plan)
{% endhint %}


# Manage Scenarios

To manage scenarios after you have created them, click on the 3 dots <img src="/files/1PMRPJZoTRxMkBClwoKb" alt="" data-size="line"> beside the scenario name at the bottom, to access further options.

## Edit a Scenario

To change the scenario's title and add an optional description click on the three dots and choose **Edit.**

<figure><img src="/files/AaVp4XCtubIdEHnzExbJ" alt="" width="188"><figcaption><p><strong>Edit a Scenario</strong></p></figcaption></figure>

This opens the **Edit Scenario** window where you can enter or change the title and description. Click **Apply**.

<figure><img src="/files/wotOmTJvKWIs8vdIkVe6" alt="" width="251"><figcaption><p><strong>Click Apply</strong></p></figcaption></figure>

{% hint style="info" %}
The baseline series once set for a scenario can not be edited. To simulate a new baseline series, either create a new scenario or use the [Duplicate](#duplicate-scenario) option.
{% endhint %}

## Duplicate Scenario

To duplicate an existing scenario into a new one, choose **Duplicate** on the three dots menu.

<figure><img src="/files/Gi0NRoBd3qIGI7GtWx4r" alt="" width="375"><figcaption><p><strong>Duplicate a Scenario</strong></p></figcaption></figure>

Enter a title and select a new baseline series if required and then click **Create.**

<figure><img src="/files/ik7mqKgIGJzLgftrgJ47" alt="" width="375"><figcaption><p><strong>Duplicate Scenario</strong></p></figcaption></figure>

{% hint style="info" %}
While duplicating a scenario, you can select a new baseline series from the **Select Baseline** dropdown list so that all the simulation steps are recreated, but essentially on a new baseline series.
{% endhint %}

## Export Scenario

You can export and download a scenario to your local system so that it can be imported again for future use whenever required.&#x20;

Click on the icons <img src="/files/8MyG2MaGR4Fcr9xDL0C0" alt="" data-size="line"> on the toolbar to export to Excel or PDF.

<figure><img src="/files/hVFrz1sdPisFpiQ8ewk5" alt=""><figcaption></figcaption></figure>

This opens a pop-up where you can choose to have an expanded hierarchical format or along with an Expand/Collapse option in the hierarchical format. After choosing, click **Export** and **Download.**

<figure><img src="/files/UHm70iNoVwY4GiqOONBP" alt="" width="375"><figcaption><p><strong>Export</strong></p></figcaption></figure>

## Delete Scenario

To delete a scenario, choose **Delete** on the menu.&#x20;

<figure><img src="/files/UAP0EaYX6ggbb4CsT1cc" alt="" width="375"><figcaption><p><strong>Delete a Scenario</strong></p></figcaption></figure>

Click **Confirm** on the pop-up to delete it.

<figure><img src="/files/EAPC8CZp08qkUmanFUYs" alt="" width="375"><figcaption><p><strong>Confirm Delete</strong></p></figcaption></figure>

## Reset Simulation

To remove the simulation on a specific node click on the **bin** icon on the node/cell or on the '**x**' icon on the simulation summary.&#x20;

<figure><img src="/files/sYiXDOFaVS4ljWpPMMTF" alt="" width="188"><figcaption><p><strong>Remove Simulation in Tree View</strong></p></figcaption></figure>

<figure><img src="/files/cuEZvednJBrK0hnaFiWg" alt="" width="563"><figcaption><p><strong>Remove Simulation in Table View</strong></p></figcaption></figure>

To remove all the applied simulations on a scenario and reset the model to its initial state click the **Clear** option on the navigation panel.

<figure><img src="/files/whWxOhrOMVkUKtRxPA56" alt=""><figcaption><p><strong>Reset Simulation</strong></p></figcaption></figure>


# Simulation Interface

Now that we have created scenarios and explored the different ways to simulate, let us see few features that can help you with customizing and fine tuning your scenario analysis.

## 1. Key Inputs

Any important node that drives the KPIs can be added as a Key Input so that it can be viewed and simulated quickly instead of searching for it in the model. You can add multiple key inputs, so that they can be simulated at once and the overall impact can be understood.

### 1.1. Add nodes as key inputs

1. Click the menu icon on the top right corner of the node and choose **Add to Key Inputs** to add that node as a key driver.

<figure><img src="/files/4J1SAxSekUaZjRokyWn9" alt="" width="375"><figcaption><p><strong>Add to Key Inputs</strong></p></figcaption></figure>

2. You can also add key inputs by clicking on **+Add** in the **Key Inputs** section.

<figure><img src="/files/aismNWUAvh3kvoKs9dNo" alt=""><figcaption><p><strong>Add Key Inputs</strong></p></figcaption></figure>

* A pop-up opens in which you can select the desired nodes to be added as key inputs.

<figure><img src="/files/wcfpfLcK7oIHxdHUerSE" alt="" width="375"><figcaption><p><strong>Select the desired node</strong></p></figcaption></figure>

* Key inputs added would be displayed in the **Key Inputs** section where you can instantly edit their values to simulate them and view the results.

<figure><img src="/files/fKzdCuR2FtAXHFnoUDQB" alt=""><figcaption><p><strong>Key Inputs section</strong></p></figcaption></figure>

3. Another way to add key inputs is through the **Node Settings** window. To open that window, click on the three dots menu and choose **Edit Node**.

<figure><img src="/files/lWRaYBqPNpOzTJ4UeFTG" alt="" width="375"><figcaption><p><strong>Edit Node</strong></p></figcaption></figure>

* This opens the Node Settings window, where you can go to the **Display** section and enable the toggle button **Show as Key Input.**

<figure><img src="/files/d24L8gDCy9vHgiBsshfC" alt=""><figcaption><p><strong>Show as Key Input</strong></p></figcaption></figure>

### 1.2. Remove nodes from key inputs

1. To remove a key input, choose **Remove from Key Inputs** from that specific node's menu.

<figure><img src="/files/oZlBCecll9J9FvGhcMEx" alt="" width="375"><figcaption><p><strong>Remove from Key Inputs</strong></p></figcaption></figure>

2. In table view, click on the three dots in the actions column beside the required key input and choose **Remove from Key Inputs**.

<figure><img src="/files/CyuEfb5mgQxHjP2JSZyy" alt=""><figcaption><p><strong>Remove from Key Inputs</strong></p></figcaption></figure>

3. The third way to remove a node from Key Inputs is to disable the toggle button **Show as Key Input** in the **Display** section of the **Node Settings** window as explained [here](https://docs.valq.com/simulate/pages/XZI8iAj4AfUR6AwSnFil#4.2.-show-as-key-input-and-show-as-kpi).

## 2. KPIs

Any important node that you consider as a Key Performance Indicator can be added as a KPI. All the added KPIs are displayed on the KPI ribbon so that after a simulation is done you can see them being dynamically updated with their new value, variance percentage and the simulation impact.

<figure><img src="/files/FUVMWQ50kkRQBsPqoJTW" alt=""><figcaption><p><strong>KPI ribbon</strong></p></figcaption></figure>

Find below the minimal view of KPI ribbon.

<figure><img src="/files/mb7cZsdgnxKtB6I2x97C" alt=""><figcaption><p><strong>Minimal view - KPI ribbon</strong></p></figcaption></figure>

### 2.1. Add nodes as KPIs

1. Click on the menu at the top right corner of the node. Then choose **Add to KPIs**. The node is now a KPI.

<figure><img src="/files/r0QU5SjFapuiYxuOai5a" alt="" width="375"><figcaption><p><strong>Add to KPIs</strong> </p></figcaption></figure>

2. Alternatively, click the pencil icon beside **KPIs** on the KPI ribbon.

<figure><img src="/files/1hud6Lilai1e7tI3hWo5" alt=""><figcaption><p><strong>Click on the pencil icon next to KPIs</strong></p></figcaption></figure>

* Click **Add** from the pop-up.

<figure><img src="/files/wO78P5CfcdQdLoSGMebV" alt="" width="375"><figcaption><p><strong>Click Add</strong></p></figcaption></figure>

* &#x20;Choose the desired node from the list to be added as a KPI.

<figure><img src="/files/dDyvCdpiO2jy1SamUaV8" alt="" width="375"><figcaption><p><strong>Add to KPIs</strong></p></figcaption></figure>

3. Another way to add KPIs is through the **Node Settings** window. To open that window, click on the three dots menu and choose **Edit Node**.

<figure><img src="/files/lWRaYBqPNpOzTJ4UeFTG" alt="" width="375"><figcaption><p><strong>Edit Node</strong></p></figcaption></figure>

* This opens the Node Settings window, where you can go to the **Display** section and enable the toggle button **Show as KPI.**

<figure><img src="/files/UCSnkrY5aloxJ1QAcfDv" alt=""><figcaption><p><strong>Show as KPI</strong></p></figcaption></figure>

### 2.2. Remove nodes from KPIs

1. To remove a node from the KPIs list, click on the pencil icon beside **KPIs** on the KPI ribbon. Then select the bin icon beside the desired node to remove it.

<figure><img src="/files/hepx749Nh2OFKvaoxiIV" alt="" width="375"><figcaption><p><strong>Remove from KPIs</strong></p></figcaption></figure>

2. You can also click on the three-dots menu on the required node and choose **Remove from KPIs.**&#x20;

<figure><img src="/files/lELXeURQo9vaAVVy8VTp" alt="" width="375"><figcaption><p><strong>Remove from KPIs</strong></p></figcaption></figure>

3. The third way to remove a node from KPIs is to disable the toggle button **Show as KPI** in the **Display** section of the **Node Settings** window as explained [here](https://docs.valq.com/simulate/pages/XZI8iAj4AfUR6AwSnFil#4.2.-show-as-key-input-and-show-as-kpi).

## 3. Constraints and Violations

Constraint is added to a node to evaluate its performance after simulation, against a threshold. After the simulation, if the node values fall below or exceed these threshold limits, a warning pops up on the screen saying that the constraint has been violated along with the difference by which it has exceeded or fallen below.

<figure><img src="/files/q8j8kRbNMRCgj1MqXGLV" alt=""><figcaption><p><strong>Constraint Warning Pop-up</strong></p></figcaption></figure>

Clicking on the violation warning symbol displays all the constraints set by the user in the model.

<figure><img src="/files/L0Srfau2wbXjkUqkPh0k" alt="" width="375"><figcaption><p><strong>All Constraints violated in the model gets displayed</strong></p></figcaption></figure>

Constraints can be added to the nodes through the Node Settings window. To know more, click [here](https://docs.valq.com/simulate/pages/XZI8iAj4AfUR6AwSnFil#4.3.-constraint).

## 4. Simulation Period

Simulation period helps set active periods to which you can perform simulation. By default, all the periods are set as the simulation period, and they can be changed to any range of periods (including a single period) for the scenarios. This behavior ensures that when you perform a simulation to the total value it only applies the simulation to the simulation period range.&#x20;

To select the simulation period range, use the drop-down list at the top.

<figure><img src="/files/Kbon0Tx9DHd2j40GfyER" alt=""><figcaption><p><strong>Change Simulation Period</strong></p></figcaption></figure>

In the below example, simulation periods have been selected as 'Apr' through 'Dec', hence the simulation is applied only to these periods as shown below.

<figure><img src="/files/FReOOD1H053jwULUgrFS" alt=""><figcaption><p><strong>Simulation applied from April to December</strong></p></figcaption></figure>

As you can see from the table view below, the periods outside the range of the simulation period are greyed out/locked indicating that the simulation has not been performed on these periods and they are the actuals.

<figure><img src="/files/mbTQ4gv10wuBQ9pMk7ZJ" alt=""><figcaption><p><strong>Simulation Period undergoes changes while other periods are not simulated</strong></p></figcaption></figure>

{% hint style="info" %}
All the scenarios created in the model would share the same simulation period.
{% endhint %}

## 5. Manage View

You can select which node details to display in the tree or table view using the **Manage View** option.

### 5.1. Node Value Display

With this option, you can view the node value, variances, and simulation impact for either only the simulation periods or for all the periods.

In the below example, the model has the time period in months and the simulation period is chosen as Jan to June. A simulation of 10% change is applied to the *Cost of Sales* node. On choosing the **Sim.Months** optio&#x6E;**,** the simulation impact is displayed as 10% and the simulated variances are shown for these 6 periods only.

<figure><img src="/files/G80VYQJ52IUuDWOiDA58" alt=""><figcaption><p><strong>Node Value for Sim. Months</strong> </p></figcaption></figure>

On Choosing the **Full Year** option, the simulation impact and the variances are re-calculated for all 12 months (Full Year range here, consists of Jan to June as simulation periods and Jul to Dec as actuals). Hence, the simulation impact is shown as 5% for the full year.

<figure><img src="/files/6gGJYws3f9TV683IBWHZ" alt=""><figcaption><p><strong>Node Value for Full Year</strong></p></figcaption></figure>

### 5.2. Secondary KPIs Display

To view the secondary KPIs on nodes, click on the option available here as shown in the image.

<figure><img src="/files/sp4QoR6Dgv20J5GJBWiP" alt=""><figcaption></figcaption></figure>

To learn how to set secondary KPIs, check out [this section](https://docs.valq.com/simulate/pages/XZI8iAj4AfUR6AwSnFil#4.5.-secondary-kpi).

### 5.3. Node Details Display Settings

You can display or hide a few more details like variance, variance%, simulation impact%, trendlines, conditional formatting, composite nodes, etc. by toggling the respective buttons.

<figure><img src="/files/y8kup0qYViV6dT1wsxa5" alt=""><figcaption><p><strong>Other Display Settings in Tree View</strong></p></figcaption></figure>

In Table View, you can check on the fields that you wish to display.

<figure><img src="/files/Q31iRklKfkPGjlfd6ndm" alt=""><figcaption><p><strong>Table View Fields Display</strong></p></figcaption></figure>

## 6. Lock nodes from simulation

To lock a specific node from being simulated, you can set the **Simulation Method** of that node to *None.* To know more, click [here.](https://docs.valq.com/simulate/pages/XZI8iAj4AfUR6AwSnFil#3.1.-simulation-method)

In the below image, the node that is disabled for simulation has a lock symbol to indicate the same.

<figure><img src="/files/QRW9rS4zYQxxOe0fhbNV" alt="" width="563"><figcaption><p><strong>Nodes locked for Simulation</strong></p></figcaption></figure>

<figure><img src="/files/BYoCgwVXIsEGwRtEZS55" alt=""><figcaption><p><strong>Simulation locked-nodes in table view</strong></p></figcaption></figure>

## 7. Focus Node

When you are working on large models, you might need to focus and zoom in on a specific node and its children on the canvas at the click of a button. Focus Node feature comes in handy in this case. Hover over the node and then click on <img src="/files/9Ei3ieUwDAYlU3r6tcFV" alt="" data-size="line"> icon on the top right corner of the node.

<figure><img src="/files/HFsmtxtd1cumzzIIHNkt" alt=""><figcaption><p><strong>Click 'Focus Node'</strong></p></figcaption></figure>

This creates a new tab with only the selected node and its children showcased on the canvas.

<figure><img src="/files/NT4MaByULlPCPOMmy69j" alt=""><figcaption><p><em><strong>US</strong></em><strong> Node is in focus mode</strong></p></figcaption></figure>

You can create multiple focus nodes and click on the required tabs/focus nodes to switch between the views and quickly navigate through the model.

<figure><img src="/files/U0CDH5ItNy8XKA5rw4o3" alt=""><figcaption><p><strong>Multiple Focus Nodes</strong></p></figcaption></figure>

## 8. Settings

Within the settings menu, you can find custom display options like show or hide empty nodes, node count, conditional formatting, and impacted nodes by simulation. You can change canvas and display-related settings like expansion level, theme, main color, font color, background color, the color of derived nodes, connectors, etc. from here.

<figure><img src="/files/9aCoxUpz2JNR6rREoFGE" alt=""><figcaption><p><strong>Settings menu in Tree View</strong></p></figcaption></figure>

Accessing this menu from the table view provides table design-related settings as shown below.

<figure><img src="/files/7Ug5VufXfeanG4Gvm4HU" alt=""><figcaption><p><strong>Settings menu in Table View</strong></p></figcaption></figure>

## 9. Number Scaling

Change the number scaling on nodes and increase or decrease decimals by clicking on this option at the top.

<figure><img src="/files/focCXV3eNdbQofgmNT0U" alt=""><figcaption><p><strong>Number Scaling</strong></p></figcaption></figure>

## 10. Export

To export your scenario to Excel or in PDF, click on the icons as shown in the below image. This is already discussed in [Export Scenario.](/simulate/manage-scenarios#export-scenario)

<figure><img src="/files/qnuH3h5I8EGVsepmqBOb" alt=""><figcaption><p><strong>Export Scenario</strong></p></figcaption></figure>


# Add Notes

Save and organize key ideas, technical or business information and even informal notes that you can refer to later, by adding notes to specific nodes in the model.

### Tree View

To add notes to a specific node, hover over the required node and click on the Add Note icon on the top right corner. Enter your note in the pop-up window and click **Save** to save it.​

<figure><img src="/files/AUoH0gc0N5vG7tBquRs0" alt="" width="563"><figcaption><p><strong>Add Note</strong></p></figcaption></figure>

Nodes with added notes are distinguished from other nodes by a triangular mark at the top right corner as shown below. On hovering your mouse over the node, you can view, edit or delete the notes.

<figure><img src="/files/jQNA5Hku3HorZOH7sohr" alt="" width="375"><figcaption><p><strong>Node with added note</strong></p></figcaption></figure>

### Table View

In table view, hover your mouse over the Actions column beside the desired node and click on **Add note** icon to add a note.

<figure><img src="/files/G5P3EgK65hrgZgBIkLkg" alt=""><figcaption><p><strong>Click 'Add note'</strong></p></figcaption></figure>

Enter a note and click **Save**.

<figure><img src="/files/7aK7ChHBwgtuehyHukHH" alt=""><figcaption><p><strong>Add Note</strong></p></figcaption></figure>

In table view, nodes with added notes are indicated as shown below.

<figure><img src="/files/h4ZXZZOuQ2xASNrojEzP" alt=""><figcaption><p><strong>Node with added note</strong></p></figcaption></figure>

### View and Edit Notes

To get an overall view of all the notes added to a model as well as to edit or delete them, click on&#x20;

**Notes->Show All Notes** on the navigation panel at the top.

<figure><img src="/files/ZicTyZiR3l58aFqPgk1f" alt=""><figcaption><p><strong>Show All Notes - Tree View</strong></p></figcaption></figure>

<figure><img src="/files/chXboW3Sm5IiQhBuxblp" alt=""><figcaption><p><strong>Show All Notes - Table View</strong></p></figcaption></figure>


# Compare Scenarios

Multiple scenarios can be created, simulated and compared to perform scenario analysis. Click on **Compare** on the navigation panel to open the **Scenario Comparison** window.

<figure><img src="/files/Dbk3uoyo65PfoGDSfKJv" alt=""><figcaption><p><strong>Click Compare for scenario comparison</strong></p></figcaption></figure>

In **Scenario Comparison** pop-up, all the scenarios are listed under the baseline using which it was created, and all the series including plan series are also available for comparison. Select the required scenarios and data series that you want to compare by checking them and then click **Compare.**

<figure><img src="/files/xsYM2VDNZv5xHDi4O3q4" alt="" width="355"><figcaption><p><strong>Select scenarios &#x26; series to compare</strong></p></figcaption></figure>

This opens the **Compare Scenarios** window where the top node value, KPIs, key inputs and simulation summary for all chosen scenarios and data series can be compared alongside each other.

<figure><img src="/files/UqKmNGgZPzpLtHX5Cqln" alt=""><figcaption><p><strong>Scenario Comparison</strong></p></figcaption></figure>

{% hint style="info" %}
The current or the active scenario is highlighted with a blue outline in the **Compare Scenarios** window.
{% endhint %}

## Manage Scenarios

Click on **Manage Scenarios** to add or remove any existing scenarios and series.&#x20;

Alternatively, you can click on the **+ icon** to add an existing scenario or data series for comparison. Click on the **bin icon** to remove them from the comparison window.

<figure><img src="/files/yJijrdXvHeLpiqslfoRd" alt=""><figcaption><p><strong>Manage Scenarios</strong></p></figcaption></figure>

Other features available in this window are highlighted in the below image.

<figure><img src="/files/btSpaxZMHhPWsxH0Y4Ln" alt=""><figcaption><p><strong>Manage Comparison Features</strong></p></figcaption></figure>

**Edit Simulation:** This icon <img src="/files/YbwplLQlAxuHvZwWjjav" alt="" data-size="line"> opens the Edit Simulation grid where you can manually edit the values for simulation at the period level for the desired nodes. This is already discussed [here](https://docs.valq.com/simulate/pages/lJGnVOM9Zbnpb3aF7Fde#1.-manual-input).

**Simulation Impact:** Clicking this icon <img src="/files/o6Rkc5zSEZ7WSMSl6Xpi" alt="" data-size="line"> opens a waterfall chart showing the breakdown of the Simulation Impact on the top node for that specific scenario.

<figure><img src="/files/QOb5YC04ToSwKqWSZMQe" alt="" width="563"><figcaption><p><strong>Waterfall Chart for Total Net Profit - Scenario 2</strong></p></figcaption></figure>

**Go to Scenario:** Navigate to the respective Scenario's tree model on the simulation canvas by clicking this icon <img src="/files/3JeHTDHkRsxt79joPaoS" alt="" data-size="line"> .

**Remove:** Finally, **bin** <img src="/files/9LSjl0RIbze7lh6QwnAP" alt="" data-size="line"> icon is used to remove the scenario from comparison.

**Add KPI:** Add any node as a KPI by clicking on **+Add** to compare.

**Add Note:** Click this icon <img src="/files/h5ex0SvTVavNsYa3ZLmN" alt="" data-size="line">to add a note and this icon <img src="/files/AwwEMrI99zDNVlH4g9PW" alt="" data-size="line"> to view already added notes.

## Download Scenario Comparison

To export the scenario comparison data to Excel, click on **Download as Excel** option.

<figure><img src="/files/4SXEAI85GcNvLFGcSrNn" alt=""><figcaption><p><strong>Download as Excel</strong></p></figcaption></figure>

This not only exports the KPIs, Key Inputs and simulation summary as seen in the window but also all the node values in the model for the respective scenarios and series under comparison.


# Scenario Analysis by Node

Scenario analysis by node helps in further investigation of scenarios along with the node details and its breakdown. It helps you to visualize the trend, variance breakdown and the simulation impact for the desired nodes and its calculation components with the help of charts.

To open the Analysis window, click on any node in the tree view or any cell on the Table View that needs to be analyzed.

For example, clicking on the *US* node from Scenario 2 of the Simulate window opens the below pop-up where you can see the values, charts, details and notes specific to the US node in Scenario 2.

<figure><img src="/files/9WKshT7nV6nyHskV43JC" alt=""><figcaption><p><strong>US node - Scenario Analysis</strong></p></figcaption></figure>

{% hint style="info" %}
At the bottom of the window, you have an option (**+**) to open other nodes and switch between the opened nodes.&#x20;
{% endhint %}

The information available on this window is explained below.

We will take up an example with the following simulation summary:

|                              |                                                        |
| ---------------------------- | ------------------------------------------------------ |
| Scenario Name                | Scenario 2                                             |
| Baseline Series              | Sum of 2022                                            |
| Comparison Series            | Sum of 2021                                            |
| Simulated Nodes with change% | ***Revenue (8%)*** and ***Expense (-6%)*** nodes of US |

## **1. Trend**&#x20;

A line chart along with a clustered column chart is used to quickly compare the simulated value, baseline value and comparison value in a period-wise distribution.&#x20;

<table><thead><tr><th width="174" align="center">Chart Element</th><th>Representation</th></tr></thead><tbody><tr><td align="center"><img src="/files/84fSeeVSo5Ni4sKVC0lw" alt="" data-size="original"></td><td>Blue-green trendline represents the scenario (simulated values)</td></tr><tr><td align="center"><img src="/files/c091RyTkou4FuXa1XrZ8" alt="" data-size="line"></td><td>Column chart in blue represents Baseline Values</td></tr><tr><td align="center"><img src="/files/N4ps7P9zUipAUItttJgf" alt="" data-size="line"></td><td>Column chart in orange represents Comparison Values</td></tr></tbody></table>

<figure><img src="/files/bBSvfKIiSJVtsIHif0um" alt=""><figcaption><p><strong>Trend chart for Total Net Profit</strong> </p></figcaption></figure>

Hover the mouse over the chart to get the simulation details for the individual periods on the tooltip.&#x20;

<figure><img src="/files/VRb8xzmr2dBDnER4d8WU" alt=""><figcaption><p><strong>Hover over to get details of simulation for a specific period</strong></p></figcaption></figure>

**Click on the table icon** <img src="/files/by9en7mDe1URDgJwbshM" alt="" data-size="line">**at the top right corner to switch to the table view.**&#x20;

Find below the table view of the trend of *Total Net Profit*.

<figure><img src="/files/a6B8c0CkL5yizx2XQYW4" alt=""><figcaption><p><strong>Trend of Total Net Profit - Table view</strong> </p></figcaption></figure>

### **1.1. Variance Charts**

In the **Trend** chart, you can choose to include variance charts for Simulation Impact, Variance and the original variance to be displayed. Each shows their respective variance. To choose, click on the dropdown menu at the top right corner of the window in the **Trend** tab.&#x20;

<figure><img src="/files/ZnekLTUkZe02m1MiwnVi" alt=""><figcaption><p><strong>Variance chart drop-down list when 'None' is selected</strong></p></figcaption></figure>

The below image shows the trend chart along with the simulation impact variance chart as **Sim.Impact** option has been chosen from the dropdown list.

<figure><img src="/files/7cM9ENzSoe24dMEWBgUv" alt=""><figcaption><p> <strong>Variance chart - 'Simulation Impact' is selected</strong></p></figcaption></figure>

Hover over the chart to get period-wise details on the tooltip. In table view, the same chart appears as shown below.

<figure><img src="/files/gA5qRU42SGjksCcTkLFY" alt=""><figcaption><p><strong>Table View of Sim.Impact and Sim Impact%</strong></p></figcaption></figure>

Similarly, the Variable and Original variance charts can be presented in graph and table views.

{% hint style="info" %}
Refer to [this section](#id-5.-node-values-and-variances) to learn the difference between simulation impact, variance and original variance.
{% endhint %}

## **2. Variance Breakdown**

A Waterfall chart shows the variance breakdown for any chosen node.

For a node with no simulation, the variance between the baseline and the comparison series is shown with a breakdown of all its immediate child nodes/calculation components.&#x20;

The image below shows the variance breakdown of the baseline series (Sum of 2022) versus the comparison series (Sum of 2021) for the *Asia* node.

<figure><img src="/files/vk0HmoAXE6t1DeaI0ZqJ" alt=""><figcaption><p><strong>Variance Breakdown of Asia's total net profit - Baseline Series vs Comparison Series</strong></p></figcaption></figure>

For a simulated node, the variance between the Scenario (simulated values) and the comparison values are shown with a breakdown of all its immediate child nodes/calculation components.&#x20;

For example, in the below image, the variance breakdown of the *Total Net Profit* node is shown for Scenario 2 versus the comparison series (Sum of 2021).

<figure><img src="/files/kYWKCIMTxoSr3tXSYxm9" alt=""><figcaption><p><strong>Variance Breakdown of Total Net Profit - Scenario 2 vs Comparison Series</strong></p></figcaption></figure>

## **3. Simulation Impact**

A waterfall chart that visually breaks down the simulation impact is shown for the selected node i.e. it shows all the simulated inputs that add up to create the new scenario value.

In the below image, the simulation impact on *Total Net Profit* is shown when *Revenue* and *Expense* values were simulated for Scenario 2.

<figure><img src="/files/Gvam2pkjY4zBQTEC8jpk" alt=""><figcaption><p><strong>Simulation Impact on Total Net Profit</strong></p></figcaption></figure>

In table view, the chart appears as shown below.

<figure><img src="/files/14rj2AClBs91X5uCiLuH" alt=""><figcaption><p><strong>Table View of Simulation Impact on Total Net Profit</strong></p></figcaption></figure>

## 4. Calculation Components

This shows the trend and comparison (line and clustered column charts) for the selected node with its calculation component nodes that make up the selected node.&#x20;

The example below shows the calculation components of Total Net Profit through trellis charts.

<figure><img src="/files/4qIHwUGpXyJOwTswjhhU" alt=""><figcaption><p><strong>Options in the Scenario Analysis window</strong></p></figcaption></figure>

All the charts of calculation components can be individually downloaded or pinned using the icons available beside each of them. For larger models, the **Search** option can be used to search for any calculation components. Clicking on the pop-up icon next to each component name opens the node scenario analysis of the selected component node.

## 5. Node Values and Variances

At the top of the window under the node title, you can view the Scenario value (simulated value), baseline value, comparison value and their simulation impact, variance and original variance.&#x20;

<figure><img src="/files/QjBZ5vQZ6NSNgl5AKfJm" alt=""><figcaption><p><strong>Variances and Simulation Impact</strong></p></figcaption></figure>

**Original Variance** shows the difference between the baseline value and the comparison before simulation.

**Simulation Impact** shows the difference between the simulated value and the baseline value.

**Variance** shows the difference between the simulated value and the comparison value.

## 6. Open Other Nodes

To include other nodes for similar analysis, click on **+ Add node details** icon on the bottom panel.

<figure><img src="/files/u29oD4qYpA4CEXa7s6cH" alt=""><figcaption><p><strong>Add node details</strong></p></figcaption></figure>

From the pop-up window, select the desired node for which you want to view the trend and analysis charts.&#x20;

<figure><img src="/files/dUwrGA4A7KeNM7Jgaghf" alt="" width="375"><figcaption><p><strong>Select the node for analysis</strong></p></figcaption></figure>

It will be added as a new tab to view and compare the charts.

<figure><img src="/files/eKJrMzlmjWF7d5HAcXh1" alt=""><figcaption><p><strong>Europe node added for analysis</strong> </p></figcaption></figure>

## 7. Table View

Toggle between table view and graph view by clicking on the table/chart icon at the top right corner of the window. Use the [variance dropdown menu](#id-1.1.-variance-charts) beside it to view the required data.

<figure><img src="/files/a6B8c0CkL5yizx2XQYW4" alt=""><figcaption><p><strong>Toggle between Table view and Graph View</strong></p></figcaption></figure>

## 8. View Node Details

On the right, under the **Details** section, you can view the node details such as its lineage, type, configuration, time aggregation, simulation method, desired trend, and the node description if added.

<figure><img src="/files/2xUIm5kWXPQpOAxXrzgc" alt=""><figcaption><p><strong>Node Details</strong></p></figcaption></figure>

## 9. Add Note

On the right, under the **Notes** section, you can add new notes or view added notes. You can also add notes in the tree or table view which is explained in detail [here](/simulate/add-notes).

## 10. Download Chart

The **Download** option on the chart lets you download the charts in PDF format.

<figure><img src="/files/WGGQ7W6VixjWsHCH2ASq" alt=""><figcaption><p><strong>Download Chart</strong> </p></figcaption></figure>

## 11. Split Screen View

Use the **Split screen** option in the top right corner to view the tree/table model and simulation analysis window simultaneously.&#x20;

<figure><img src="/files/FOVua7QW2lTDGGT8tT9O" alt=""><figcaption><p><strong>Click 'Split screen' option</strong></p></figcaption></figure>

The split screen also offers all the above options available in full-screen mode.

<figure><img src="/files/gRio3rgFj7DX9S7BKPVV" alt=""><figcaption><p><strong>Split Screen</strong></p></figcaption></figure>

You can switch between full-screen mode and split-screen mode. To close the analysis window click **close.**


# Create Initiatives in a Scenario

Initiatives are particularly useful when multiple assumptions need to be simulated, either individually or in a desired combination, and evaluated based on their potential outcomes. They are quite effective for a quick and seamless scenario analysis as opposed to creating multiple scenarios for each of the combinations. This aids in strategic value driver planning.

### How do Initiatives work?

1. You can create many initiatives within one scenario.
2. By default, the simulation impact of all the initiatives is included in a scenario.
3. Choose to include or exclude required initiatives in a scenario to assess their individual/combined impact.

<figure><img src="/files/MPag8BVIteEeApgoQfLI" alt=""><figcaption><p><strong>Working with Initiatives</strong></p></figcaption></figure>

### Use-cases and advantages of initiatives

1. Create what-if scenarios for smaller organizational units as initiatives and merge them as required to understand the total impact. Alternatively, you can drill down a scenario by excluding a few initiatives to understand the unit-level impact.
2. Simulate possible risks that can occur in the course of your project/business by adding them as initiatives within your base case/best case/worst case scenarios. This can help you in contingency planning.
3. Multiple driver combinations can be simulated on the fly without having to start from scratch.
4. Both micro-level and macro-level scenarios can be analyzed quickly.

Let us now see how to create and add them to the scenarios in the next section.


# Steps to create initiatives

## Enable Initiatives

Initiatives can be enabled by turning on the toggle button in the [Settings ](/model/global-settings)menu as shown below.

<figure><img src="/files/7IPqUdCfDLRXoxYXqOgw" alt=""><figcaption><p><strong>Enable Initiatives</strong></p></figcaption></figure>

## Initiative and Scenario Views

When initiatives are enabled, the simulation slider appears only on the 'Initiatives' view and not on the 'Scenario' View. In other words, users can only simulate the initiatives rather than the whole scenario.

To toggle between both views use the Initiatives/Scenario dropdown menu.

<figure><img src="/files/TZpJJBdg6wwdfOHizbWe" alt=""><figcaption><p><strong>Simulating is possible only in initiative view</strong></p></figcaption></figure>

### Initiative View

Choose **Initiatives** from the Initiatives/Scenario dropdown menu. In this view, you can perform all the necessary simulations on the drivers in both the tree and the table view.

#### Add/Edit/Delete Initiatives

The menu at the top allows you to add, edit, delete and navigate between different initiatives.

By default, every scenario has an initiative, *Initiative 1.* This means that all the simulations you make on Initiative 1 are also the simulations for Scenario 1 if the scenario has only one initiative.

1. **Add Initiative:** Click on the **+Add** option beside the Initiatives dropdown menu. A new initiative is created where you can perform the required simulations.
2. **View/Navigate:** Use the dropdown menu to **navigate** between the different initiatives. After navigating to the required initiative, you can see the simulation results corresponding to that initiative.
3. **Rename:** Initiatives are named as Initiative 1, Initiative 2, and so on by default. You can use the pencil icon beside it to **rename** it.
4. **Delete:** Click on the bin icon to **delete** the desired initiative. You cannot delete Initiative 1 which is the default initiative.

You can find below the image that illustrates the above actions.

<figure><img src="/files/9tsx8WkW85JKGlp9bWOo" alt=""><figcaption><p><strong>Initiative actions</strong> </p></figcaption></figure>

### Scenario View

Choose **Scenario** from the Initiatives/Scenario dropdown menu. This gives the overall scenario results where you can view all the initiatives' aggregated simulation impact.

The numbers on the simulated nodes indicate the number of initiatives in which they have been simulated. Hovering over the numbers, you can view the simulation impact of all the initiatives on that specific node.

<figure><img src="/files/WKru3W3FTBBgTBNJUlMH" alt=""><figcaption><p><strong>Aggregated and Individual Sim. Impact</strong></p></figcaption></figure>

To analyze the overall impact of specific initiatives individually or collectively, click on the 'Initiatives' dropdown which opens a table containing the details of included and excluded initiatives.

<figure><img src="/files/nct5OGDFbO7Xe4mf6ZT3" alt=""><figcaption><p><strong>Include/Exclude Initiatives</strong></p></figcaption></figure>

Select an initiative and then click the arrows to move it from included to excluded, or vice versa. This allows you to view their simulation results accordingly.




---

[Next Page](/llms-full.txt/1)

