Dimension references
Read the same item, one named item, a set of items, or the sum of all items of a dimension in a formula.
When a variable is broken down by a dimension, Eigenn runs its formula one time for each item. A dimension reference tells the formula which items of another variable to read. Use this page when a formula must read a specific item, or must add up the items.
The examples use a Region dimension with the items North America, Europe, and APAC.
The same item
A plain variable name in an item row reads the same item, if that variable has the same dimension. If the variable does not have the dimension, the formula reads its single value.
Revenue is broken down by Region and uses this formula:
Units sold * Price per unitUnits sold is broken down by Region. Price per unit is not. In the Europe row, the formula reads the Europe value of Units sold and the single value of Price per unit.
One named item
Write by, the dimension name, and the item name in square brackets:
Revenue by Region[Europe]This reads the Europe item in every period and in every item row. You can use it in any formula, also in a variable that has no dimension. For example, a Europe share variable:
Revenue by Region[Europe] / RevenueHere, Revenue without by reads the total row of Revenue.
A set of items
Put more than one item in the brackets. Eigenn adds the items together.
Revenue by Region[Europe, APAC]In the formula bar, type [ after the dimension name to see the items. Select an item and press Enter. To add one more item and keep the list open, hold Shift and press Enter.
All items of a dimension
Write by and the dimension name without brackets:
Bookings by Region * Commission rate- In an item row of the same dimension,
Bookings by Regionreads the same item. - In a variable without that dimension, it gives the sum of all items.
A formula can name only one dimension with by. A formula with by Region and by Product gives the error A formula cannot combine dimensions: Region, Product. A reference with items in brackets does not count.
Linked dimensions
Two dimensions can have linked items. You set this in the dimension under Link items. For example, each country item maps to one region. Then Revenue by Region can read a Revenue variable that is broken down by country. Eigenn adds the countries of each region.
If no link connects the two dimensions, the formula bar shows an error, such as Missing dimension path: "Revenue" cannot map to "Region".
Test the item
To give one item different logic, compare the dimension with an item name:
if Region = Europe then Price per unit * 1.2 else Price per unitEigenn evaluates the test for the item that it calculates. You can also test a list of items with in:
if Region in [Europe, APAC] then 0.2 else 0.1Choose the dimensions of the result
A new formula takes the dimensions of the variables that it reads. To choose them yourself:
- Open the formula of the variable.
- Select Dimensions in the formula bar.
- Select one dimension. To nest one more dimension, hold Shift and select it.
- To remove the breakdown, select Aggregate.
- Press Enter to save.
The Dimensions control shows only when the model has a dimension, and only for the all-period formula of a variable. It does not show for an item row or a period formula.