# Quick formula

Inforiver provides several one-click calculations for inserting columns and rows.

### 1. Quick formula

Columns/measures such as running total, % contribution to parent/grand total, etc. can be inserted in a single click. These options can be accessed from the Insert tab > Quick formula.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FCd992fJuipO3nqwSwlPq%2Fimage.png?alt=media&#x26;token=b2861328-a5cf-4191-8ef3-9ec7522b82ea" alt=""><figcaption><p>Quick formulas in Inforiver</p></figcaption></figure>

When you write custom formulas, you can also reference quick formula measures in them.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FLons1m2hHLOXrab1taVy%2Fimage.png?alt=media&#x26;token=5950f3bd-d6c0-4f1b-9f5a-6aafd5e65e26" alt=""><figcaption></figcaption></figure>

#### i) Running total

The following configuration options are available for 'Running total'.&#x20;

Insert as - The running total can be inserted as a [measure or column](https://docs.inforiver.com/working-with-inforiver/insert-manual-input-columns#2.-measure-vs-column).

Based on Measure - Column/measure based on which the running total needs to be calculated.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FNTXlyIpXlvSidR4q1970%2Fimage.png?alt=media&#x26;token=643e6bb7-6273-408d-a64b-37a21683f8b3" alt=""><figcaption><p>Running total for Actuals </p></figcaption></figure>

If you want to calculate the running total for all leaf nodes,  irrespective of the level of the hierarchy they belong to, select the 'Continuous Total'  checkbox.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FHriT3V7yRDFJbAJLnkgn%2Fimage.png?alt=media&#x26;token=cee0bb46-0947-4299-82f6-39043f9b742c" alt=""><figcaption><p>Continuous running total for hierarchical datasets</p></figcaption></figure>

#### ii) Percentage running total

This formula is a variant of the running total quick formula. The running total is first calculated in the background at each level of the hierarchy, after which it is displayed as a percentage of the total/subtotal.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FjPTE48Fa23BMzb7yg5ZP%2Fimage.png?alt=media&#x26;token=7286ad2e-2dca-4caf-aab7-407216c0341e" alt=""><figcaption><p>Percentage running total formula</p></figcaption></figure>

#### iii)  %Growth/Decline

This option allows you to insert visual measures or a column that calculates the required percentage growth or decline of the chosen measure.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FGBJ3RCFSmMBO1RZl3RzS%2Fimage.png?alt=media&#x26;token=a5f700e4-c5d9-4f52-a810-dbdb436b6f72" alt=""><figcaption><p>%Growth/Decline</p></figcaption></figure>

#### iv) % Contribution to parent

Use this option to quickly calculate each member's contribution to their parent's total value. In addition to choosing to insert as a visual measure/column and the base value, a progress bar can be enabled along with a percentage and/or value to display.&#x20;

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FrfgQf86YwxjmfEgTCraj%2F4.5.4(2)%20Quick%20formula.png?alt=media&#x26;token=3ea65915-618c-4312-91bc-6d6f26ece832" alt=""><figcaption><p>% Contribution of 2022 Actuals to parent</p></figcaption></figure>

#### v) % Contribution to grand total

Contribution to the grand total can be inserted as shown below. To insert % contribution only for a selected category instead of all the categories or only for the column grand total, choose the 'Visual column' option and the corresponding column.&#x20;

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2Fk40ir2EiCHSQ4CPnhaJY%2F4.5.5(2)%20Quick%20formula.png?alt=media&#x26;token=1179e5ba-9403-4e1d-825b-248e6fa7d4f4" alt=""><figcaption><p>% Contribution to grand total as visual column</p></figcaption></figure>

#### vi) Lead/lag

You can perform a lead /lag calculation to shift any trend data by 'n' periods. This helps you quickly perform downstream variance calculations such as QoQ growth, YoY growth, etc. for each period.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FkN2070lcFEINQ5TG56zy%2F4.5.6%20Quick%20formula.png?alt=media&#x26;token=ffc53a6f-7f14-4eaa-a703-cf1d6e291109" alt=""><figcaption><p>Lead/lag calculations</p></figcaption></figure>

#### vii) Overall ranking

Ranks can be added across different groups in a single click. Choose to insert as a measure or column and the base measure. Note that there are no ranks applied for the subtotals.&#x20;

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FyMlgWlxB2ygWw3ijKCKa%2F4.5.7%20Quick%20formula.png?alt=media&#x26;token=d92b8b75-cc91-4108-8b3b-473ee69705b7" alt=""><figcaption><p>Overall ranking</p></figcaption></figure>

#### viii) Ranking within a group

Ranks within groups can be added including ranks for subtotals as shown in the below image.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FdKvXoLz0dfM6whLyZprz%2F4.5.8%20Quick%20formula.png?alt=media&#x26;token=6d1230cd-66f5-43e7-9701-08f6021657b1" alt=""><figcaption><p>Ranking within group</p></figcaption></figure>

#### ix) Insert variance

The default variance calculated by Inforiver is based on the first measure added to the AC/PY/PL/FC fields. *Insert Variance* can be used to calculate the variance between any native measures, simulations, or formula fields in your report.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FPQmytzFO83e1YL8qlgiw%2Fimage.png?alt=media&#x26;token=38a32849-ec73-4ece-b4c9-1855aaaf1054" alt=""><figcaption><p>Insert variance</p></figcaption></figure>

#### x) Empty Column

This option allows you to insert an empty column into the report to improve readability and visual appeal. Values cannot be entered in this column.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FOvM4vTXVwtaNaf8q1JRX%2Fimage.png?alt=media&#x26;token=bbca75d1-9a9d-407e-b7e7-c3fe8044dd5a" alt=""><figcaption><p>Empty Column</p></figcaption></figure>

#### xi) Empty Measure

This option allows you to insert empty measures into the report to improve readability and visual appeal. Values cannot be entered in these measures.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2Ff4T7mHOdwBRF0v0C6y2w%2Fimage.png?alt=media&#x26;token=9246fb2c-54f9-43c3-8efb-f7a1afeb53f2" alt=""><figcaption><p>Empty Measure</p></figcaption></figure>

### 2. Smart analysis

% contribution and variance % columns can be added in a single click based on any cell in the visual. These can be accessed in the Insert tab -> Smart analysis as shown below.

{% hint style="info" %}
You need to select a cell to enable the 'Smart analysis' option.
{% endhint %}

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FPQti338mNN8bKw1s3Qi5%2F4.5.9%20Smart%20analysis.png?alt=media&#x26;token=38ac7c14-79ed-4606-b1fd-86c8c503f006" alt=""><figcaption><p>Smart analysis</p></figcaption></figure>

In the below image, % contribution has been added based on 2022 Actuals -> East.&#x20;

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2F8pF9fDSNa0wESDyzLdI5%2F4.5.11(2)%20Smart%20analysis.png?alt=media&#x26;token=ac4f13b3-bd43-43b6-b52d-cea6f1037365" alt=""><figcaption><p>Smart analysis - Contribution</p></figcaption></figure>

In the below image, % variance has been added based on the grand total. But you can choose any other value as well. Note that the calculation gets added as a measure or column based on the presence of categories in the column field.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FAdUFs49dWxxYaSJmDdiG%2F4.5.10%20Smart%20analysis.png?alt=media&#x26;token=5e21f758-712b-4a43-87c9-6abd9c6d620a" alt=""><figcaption><p>Smart analysis - Variance </p></figcaption></figure>

### 3. % Contribution rows

% Contribution based on any row can be inserted in a single click. To achieve this, in the Insert tab-> Insert row, select '% Contribution row'.

{% hint style="info" %}
Select a row to enable the 'Insert row' option.
{% endhint %}

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FEynJHt9C0is0V5N4GQhQ%2F4.5.12%20Contribution%20row.png?alt=media&#x26;token=debe4fba-f7c6-46a6-af65-13ac9c55f0dd" alt=""><figcaption><p>% Contribution row</p></figcaption></figure>

The % contribution row gets added as shown below.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FwrRwC1scVOQBp8QtapgT%2F4.5.13%20Contribution%20row.png?alt=media&#x26;token=e261d6a7-afa6-4f11-87e4-36a5a9d7331e" alt=""><figcaption><p>% Contribution row added</p></figcaption></figure>
