Skip to content

Commit

Permalink
GITBOOK-528: formula
Browse files Browse the repository at this point in the history
  • Loading branch information
PreethaS1 authored and gitbook-bot committed Aug 2, 2024
1 parent 79ab9a2 commit e5e0dfb
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 2 deletions.
Binary file added .gitbook/assets/Forecast reference.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/errormsgsinformula.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/image (891).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/image (892).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@
* [YTD](formula-syntax/time-intelligence-functions/ytd.md)
* [Other operators](formula-syntax/other-operators.md)
* [Identifiers](formula-syntax/identifiers/README.md)
* [CLOSEDPERIOD](formula-syntax/identifiers/closedperiod.md)
* [COLUMN.DATE](formula-syntax/identifiers/column.date.md)
* [COLUMN.PARENT](formula-syntax/identifiers/column.parent.md)
* [COLUMNS](formula-syntax/identifiers/column.md)
* [DESCENDANTS](formula-syntax/identifiers/descendants.md)
* [GROUP INDEX](formula-syntax/identifiers/group-index.md)
Expand All @@ -303,7 +306,6 @@
* [RELATIVE\_COLUMN](formula-syntax/identifiers/relative\_column.md)
* [ROW.PARENT](formula-syntax/identifiers/row.parent.md)
* [ROW.LABEL](formula-syntax/identifiers/row.label.md)
* [COLUMN.PARENT](formula-syntax/identifiers/column.parent.md)
* [Scripting functions](formula-syntax/scripting-functions/README.md)
* [DISPLAYTOAST](formula-syntax/scripting-functions/displaytoast.md)
* [EXPORT](formula-syntax/scripting-functions/export.md)
Expand Down
2 changes: 1 addition & 1 deletion formula-syntax/identifiers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ All the identifiers available in Inforiver are showcased with examples in the be

{% file src="../../.gitbook/assets/Inforiver Formula - Identifiers (1).pbix" %}

<table><thead><tr><th width="203">IDENTIFIER</th><th width="188">USAGE</th><th>DESCRIPTION</th><th data-hidden>EXAMPLE</th><th data-hidden>EXPLANATION</th></tr></thead><tbody><tr><td><a href="column.md">COLUMNS</a></td><td>Calculated measure formula</td><td>Returns a reference to a specific column in the report</td><td>IF(COLUMN == "AC", 5000, 6000)</td><td>On using in the row formula, returns 5000 for AC column and 6000 for other columns</td></tr><tr><td><a href="descendants.md">DESCENDANTS</a></td><td>Calculated row formula</td><td>Returns all the children's values (till the leaf level) as an array</td><td></td><td></td></tr><tr><td><a href="group-index.md">GROUP_INDEX</a></td><td>Calculated row/column formula</td><td>Returns the position of a column</td><td>IF(GROUP_INDEX = 1, [Sales],([Sales].RELATIVE(-1) - [Sales].RELATIVE),</td><td>With Months in column, Displays the Sales value when it is the 1st month/column(group_index =1), else returns for all other months, the variance between previous and current month</td></tr><tr><td><a href="has.md">HAS</a></td><td>Calculated column formula</td><td>Checks if the specified value is part of the list</td><td></td><td></td></tr><tr><td><a href="has_all.md">HAS_ALL</a></td><td>Calculated column formula</td><td>Checks if all the specified values are part of the list</td><td></td><td></td></tr><tr><td><a href="has_some.md">HAS_SOME</a></td><td>Calculated column formula</td><td>Checks if one or more of the specified values are part of the list</td><td></td><td></td></tr><tr><td><a href="level.md">LEVEL</a></td><td>Calculated column formula</td><td>Returns the row level in the hierarchy</td><td>IF(LEVEL = 3, 10, 5)</td><td>For each row where the heirarchy level is 3, returns 10; for other hierarchy levels, returns 5</td></tr><tr><td><a href="../logical-functions/match.md">MATCH</a></td><td>Calculated column formula</td><td>Checks whether the specified value is an exact match </td><td></td><td></td></tr><tr><td><a href="members.md">MEMBERS</a></td><td>Calculated row formula</td><td>Returns all the immediate children's values as an array</td><td></td><td></td></tr><tr><td><a href="relative.md">RELATIVE</a></td><td>Calculated column formula </td><td>Changes the absolute cell/column reference to a relative reference</td><td>IFNA(([Sales].RELATIVE(-1) - [Sales].RELATIVE), [Sales].RELATIVE)</td><td>When Months in the columns, formula returns Sales of Previous month - Current Month Sales except when there is an error, then it returns the Sales of Current Month</td></tr><tr><td><a href="relative_column.md">RELATIVE_COLUMN</a></td><td>Calculated row formula</td><td>Returns the value of the column relative to the current column</td><td></td><td></td></tr><tr><td>ROW.LABEL</td><td>Calculated row formula</td><td>Returns field values used to populate rows in the report</td><td></td><td></td></tr><tr><td><a href="row.parent.md">ROW.PARENT</a></td><td>Calculated row formula</td><td>Returns a reference to the parent levels in the hierarchy</td><td>ROW.PARENT.AC + ROW.PARENT.PY</td><td>For each row it adds the value of its parent row's AC column and PY column</td></tr></tbody></table>
<table><thead><tr><th width="203">IDENTIFIER</th><th width="188">USAGE</th><th>DESCRIPTION</th><th data-hidden>EXAMPLE</th><th data-hidden>EXPLANATION</th></tr></thead><tbody><tr><td><a href="closedperiod.md">CLOSEDPERIOD</a></td><td>Forecast measure</td><td>Checks if the forecast columns are for the closed or open period</td><td></td><td></td></tr><tr><td><a href="column.date.md">COLUMN.DATE</a></td><td>Calculated column formula</td><td>Returns the date in a column title/column header</td><td></td><td></td></tr><tr><td><a href="column.parent.md">COLUMN.PARENT</a></td><td>Calculated column measure</td><td>Returns the column's immediate parent in a column hierarchy</td><td></td><td></td></tr><tr><td><a href="column.md">COLUMNS</a></td><td>Calculated measure formula</td><td>Returns a reference to a specific column in the report</td><td>IF(COLUMN == "AC", 5000, 6000)</td><td>On using in the row formula, returns 5000 for AC column and 6000 for other columns</td></tr><tr><td><a href="descendants.md">DESCENDANTS</a></td><td>Calculated row formula</td><td>Returns all the children's values (till the leaf level) as an array</td><td></td><td></td></tr><tr><td><a href="group-index.md">GROUP_INDEX</a></td><td>Calculated row/column formula</td><td>Returns the position of a column</td><td>IF(GROUP_INDEX = 1, [Sales],([Sales].RELATIVE(-1) - [Sales].RELATIVE),</td><td>With Months in column, Displays the Sales value when it is the 1st month/column(group_index =1), else returns for all other months, the variance between previous and current month</td></tr><tr><td><a href="has.md">HAS</a></td><td>Calculated column formula</td><td>Checks if the specified value is part of the list</td><td></td><td></td></tr><tr><td><a href="has_all.md">HAS_ALL</a></td><td>Calculated column formula</td><td>Checks if all the specified values are part of the list</td><td></td><td></td></tr><tr><td><a href="has_some.md">HAS_SOME</a></td><td>Calculated column formula</td><td>Checks if one or more of the specified values are part of the list</td><td></td><td></td></tr><tr><td><a href="level.md">LEVEL</a></td><td>Calculated column formula</td><td>Returns the row level in the hierarchy</td><td>IF(LEVEL = 3, 10, 5)</td><td>For each row where the heirarchy level is 3, returns 10; for other hierarchy levels, returns 5</td></tr><tr><td><a href="../logical-functions/match.md">MATCH</a></td><td>Calculated column formula</td><td>Checks whether the specified value is an exact match </td><td></td><td></td></tr><tr><td><a href="members.md">MEMBERS</a></td><td>Calculated row formula</td><td>Returns all the immediate children's values as an array</td><td></td><td></td></tr><tr><td><a href="relative.md">RELATIVE</a></td><td>Calculated column formula </td><td>Changes the absolute cell/column reference to a relative reference</td><td>IFNA(([Sales].RELATIVE(-1) - [Sales].RELATIVE), [Sales].RELATIVE)</td><td>When Months in the columns, formula returns Sales of Previous month - Current Month Sales except when there is an error, then it returns the Sales of Current Month</td></tr><tr><td><a href="relative_column.md">RELATIVE_COLUMN</a></td><td>Calculated row formula</td><td>Returns the value of the column relative to the current column</td><td></td><td></td></tr><tr><td><a href="row.label.md">ROW.LABEL</a></td><td>Calculated row formula</td><td>Returns field values used to populate rows in the report</td><td></td><td></td></tr><tr><td><a href="row.parent.md">ROW.PARENT</a></td><td>Calculated row formula</td><td>Returns a reference to the parent levels in the hierarchy</td><td>ROW.PARENT.AC + ROW.PARENT.PY</td><td>For each row it adds the value of its parent row's AC column and PY column</td></tr></tbody></table>
11 changes: 11 additions & 0 deletions formula-syntax/identifiers/closedperiod.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# CLOSEDPERIOD

The CLOSEDPERIOD function is used in conjunction with \[Forecast] to refer to the closed periods in a forecast. To refer to the open periods, use the NOT operator along with the CLOSEDPERIOD function.&#x20;

## Example

When you need to perform an action specific to the closed or open periods, you can use the .CLOSEDPERIOD along with existing functions and identifiers.

In the example below, we have added adjustment values to the open periods, and for the closed periods, we have marked them as 'closed'. This has been done using the conditional statement, [IF](../conditional-statements/).

<figure><img src="../../.gitbook/assets/Forecast reference.png" alt=""><figcaption><p>.CLOSEDPERIOD</p></figcaption></figure>
13 changes: 13 additions & 0 deletions formula-syntax/identifiers/column.date.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# COLUMN.DATE

COLUMN.DATE returns the date available in the measure or column header.

### Example <a href="#example" id="example"></a>

We want to add a date column with the date value extracted from the column header's date hierarchy.

<figure><img src="../../.gitbook/assets/image (891).png" alt=""><figcaption><p>COLUMN.DATE()</p></figcaption></figure>

If user enters a date in the measure/column header's 'Title', COLUMN.DATE() returns that date from the title overriding the date dimensions in the headers.

<figure><img src="../../.gitbook/assets/image (892).png" alt=""><figcaption><p>COLUMN.DATE()</p></figcaption></figure>
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ A new row containing the sum of the selected rows is created as shown below. You

Similarly, for calculating and inserting the average of rows, use **Insert Avg of rows.**

Any errors in the formula can be easily located with clear and concise error messages. In the maximized formula editor view, you will also notice line numbers, allowing you to quickly locate and fix errors.

<figure><img src="../../../.gitbook/assets/errormsgsinformula.gif" alt=""><figcaption><p>Fixing errors in formula</p></figcaption></figure>

### 2. Include in total

a) Check the 'Include in total' checkbox as we need the Specialty Beverages value to be included in the Beverages total and the grand total. Click 'Create'.&#x20;
Expand Down

0 comments on commit e5e0dfb

Please sign in to comment.