- 7 Minutes to read
- Print
- DarkLight
- PDF
Using SpotlightXL-Model Calculation Subtask
- 7 Minutes to read
- Print
- DarkLight
- PDF
Overview
With this subtask, you can define formulas on any dimension member within a single dimension. No cross-dimensional formulas are supported at this time. You can have multiple formulas per model. Formulas are the building blocks of calculations. The calculation defines the logical order in which formulas are executed.
Actions Available
The table below provides a description of the actions available for the Formula subtask.
Action | Description |
---|---|
Use Reference Manager to reference a dimensional intersection from any dimension within the Model. Use Case: You want to calculate the amount for Quantity and Price for all default products, but Quantity and Price dimensions are located at two different dimension intersections (Budget Model; Qty-Budget Input view and Price-Budget Input). The Qty-Budget Input view is displayed below and has the Time, Product and Region dimensions and Quantity is captured based on these dimensions. The Price-Budget Input view is displayed below with Region and Price dimensions. The formula is quantity times prices as shown below. However, you do not want to use the price for each individual product but rather the price of the Default product. Copy Price to the Formula Member line. Select the Formula Reference cell, and click the Reference Manager button. Select the Default member for Product as shown below. When the formula is executed, it takes the Price available at the ‘Default’ product and multiplies it by the Units for each specific product, region, and month. Amount after executing the formula (Qty * Price) shown below. Qty measure – Data available by Region and by Product. Price measure – Data available by Region for ‘Default’ Product only. You can also use variables, variable expressions, and substitution variables in the Formula Reference section. See Using Substitution Variables in Variable Expressions in Formulas with a Formula Reference. | |
After a selection is made, click Refresh to view updated data. | |
Save defined formula data. | |
Delete a selected formula. |
The table below describes the spreadsheet fields on the Formula page.
Field | Description |
---|---|
Model | The name of the model that contains the dimension for which the formula will be applied. |
Dimension | The name of the dimension for which the formula will be applied. |
Name | The name of the formula. |
Description | An optional description of the formula. |
Created On and By | Automatically populated fields to show who created the formula and when. |
Modified On and By | Automatically populated fields to show who last modified the formula and when. |
Dimension | The dimension members the formula will be applied to. You can have the same dimension listed multiple times with different filters applied. This section essentially defines the scope of the formula. In the example below, the Time dimension is listed twice. The filter is FixedMember for each and is set to Q1 and Q2. This means that this formula will be calculated with Time dimension data for only these two quarters. Another example is provided below where, in addition to Time, the Department dimension is filtered so that data from the Product Departments and Design Depts and all members below will be included in the formula calculation. |
Filter | Select how you want the members of the dimension selected. For example, do you want to select all dimension members or a specified (fixed) dimension member.
|
Filter Value | Based on the Filter selected, enter a value in the Filter Value field. For example, if FixedMember is selected as the Filter for Scenario and you want the formula applied to the Actual scenario, you would enter Actual in the Filter Value field or select it from the drop-down. If Filter is AllMembers, Filter Value must be None. If Filter is FixedMember, LevelAndAbove, MemberAndBelow, or LeafMembers, Filter Value must be a dimension member name or an expression that renders a dimension member name. |
Formula Design | In this section, you enter the formula associated with the dimension selected in the Dimension field. That dimension is automatically indicated in column A and the word Formula is indicated in column B. Used the drop-down to select the name of the dimension member that will hold the result of the formula, which we will call the calculated member. Then add rows as needed above the calculated member to specify any and all dimension members that are needed in the formula. In the example below, the calculated member is Forecast. A row is added above Forecast, and Actual is selected. This indicates that the formula used to calculate Forecast is dependent on the data in Actual. In column B next to the calculated member (the member that will contain the result of the formula), enter the formula using Excel-style syntax. Assume that the data is in column B of the other dimension members listed. In the example below, a formula (on Forecast) is defined on a Scenario dimension. The formula is Actual multiplied by 1.5. The formula will affect all members but only for the selected period. In this section, you can also use Variables and Expressions, so long as they are variables on the dimension selected in the Dimension field. In the following example, @Year@ is a variable defined on the Time dimension and it is copied to five other months.
After running the formula via a calculation, you can see the changes. For more information, see How to Use Variables and Variable Expressions in a Formula. |
Formula Member | Specifies a dimension member that is used in the formula. This must be one of the members listed in column A under Formula Design. |
Formula Reference | Defines the member of the dimension specified to be used by default in the formula. After selecting the Formula Member in column A of this section, select the cell under Formula Reference. Then click the Reference Manager button. Use the Reference Manager to select a particular dimension member that will be used as the reference anytime the Formula Member is used in the formula calculation. For example, instead of using the Price associated with each member intersection of Region, Product, Scenario, and Time, you can specify to use only the Price associated with the Default Product. Note: You can also use variables and variable expressions in the Formula Reference column. See Reference Manager for details. |
Using Attributes in Formulas
For information on using Attributes in Formulas, see Using Attributes in Formulas to Identify Cells to Calculate.