- 3 Minutes to read
- Print
- DarkLight
- PDF
Using SpotlightXL-Model Scopes Subtask
- 3 Minutes to read
- Print
- DarkLight
- PDF
Overview
Define filters for a model’s dimension members. Defining a scope for each model improves performance and scalability by allowing you to perform calculations on a block of data versus an entire model.
Access the Scope page by selecting the Model task and the Scope subtask. You can set up the scope for all models whether they are in a generated or not generated state.
Available Actions
Information on each field on the Scope page is provided below.
- Refresh - After a selection is made, click Refresh to view updated data.
- Save - Save a defined scope.
- Delete - Delete a selected scope.
- Model - The name of the model in which you want to define a scope for.
- Name - The name of the scope.
- Dimension - The dimensions members the scope will be applied to.
- Filter - Select how you want the scope applied. For example, do you want it applied to all dimension members or a specified (fixed) dimension member.
- AllMembers – The operation will apply to all members of the dimension.
- MemberandBelow – The operation will apply to all data for the selected member and below (all levels below, including children, grandchildren, and so on, down to the leaf level).
- LeafMembers – The operation will apply only to leaf members of the selected dimension or parent-level dimension member.
- FixedMember – The operation will apply to a specific member of the dimension.
- 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 scope applied to the Actual scenario, you would enter Actual in the Filter Value field.
When defining a Scope, you can add multiple lines for the same dimension (similar to the way you can add multiple lines for the same dimension when defining Maps). Once the Scope is defined, it can be used in a Calculation. The default option in a Calculation for Scope Name is None. Otherwise, specify a Scope in the Name column of the Calculation.
Example
- Define a scope called My Scope for Allocation Model.
- Define it to include the year Q1 2021 and all its children.
- Go to Model > Calculation.
- On the Calculation page, select the model.
- Then select ClearAllData from the Type list box and provide the scope name.
- Only data associated with the year Q1 2021 is cleared.
See the Calculation page for information on Types.
See Also: Using Scope with Aggregation
How To Apply Scope to a Model?
- In SpotlightXL, navigate to the Model > Scope.
- Select the model you want to apply scope to from the Model drop-down.
- Enter a name for the scope.
- All dimensions associated with the model are displayed. Filter dimension members as needed.
- Save the scope.
- Add the defined scope to the calculation for the model.
- Navigate to the Model > Setup page. The newly defined scope is listed under the Scope field, as shown below.
Use Variables and Variable Expressions in a Scope
You can use both variables and variable expressions in Maps, Formulas, and Scopes.
To see details about how expressions work, their syntax, and how to chain them together, see Example Substitution Variable Expressions.
Variables and Expressions are supported in both SpotlightXL and Spotlight.
Variables and Expressions in a Scope
The following example shows one variable and an expression used in a Scope. Editing a Scope is available only in SpotlightXL at this time.
In SpotlightXL, select Model > Scope:
Expressions are not supported directly in calculations but you can use expressions in the Scope which is used by the calculation. The following example shows a calculation that uses variables from a scope, formula, and a map.
- The Map gets data from the source model based on the variables pointing to a particular month.
- The Aggregation uses a Scope to calculate the total in the quarter parent of the particular month.
- The Formula calculates the Budget Variance for the same year as the particular month.
Use the Variables Manager to set the values of the variables.
- In SpotlightXL, select Model > Calculation.
- In Spotlight Web, select Model, select a Calculation, and click the pencil icon to open the Variable Manager.