Linked Models are used in various ways when designing and building an application. In this article we will discuss the three main uses for Linked Models:
- Model Measures
- Valid Form Relationships
- Validation Models
To create a Linked Model, navigate to the LINKED MODEL tab for the desired Model.
When there's a need to use Measure values from another Model, Linked Models are useful for providing access to those values. In this example, the Rule Calculate Percentages uses [Profit_Value].
Valid Form Relationships
A more common purpose in linking Models is to define relationships in Forms. These relationships define the valid combination of members across Dimensions within a Model. For instance, there might be a set of products that are sold in certain countries, or a relationship that defines which Accounts are valid for a set of Departments. You can configure relationships in a Form by using the Measure from the Linked Model of a Parent Model.
In the By Metric Form below, we want to define a relationship between the Department filter (i.e., the Department Dimension) and the Employee Type filter (i.e., the Employee Type Dimension) so that whenever a department is selected, the employee type filter will only show the options that the department has.
For example, there are no Contract employees in AMERICAS, so when the Department Filter is set to AMERICAS, Contract will be hid from the candidate list, as shown below.
The Department – Employee Type relationship validation information is stored in the [Dep-Emp-Type Validation] Model (when there is a record existing in this Model, the combination is considered Valid. Otherwise, it's Invalid), so we need to link it to the HR Planning Model.
Select the LINKED MODEL tab of the HR Planning Model. Click the Add button in the ribbon. Check the box for Dep-Emp-Type Validation and click OK.
Then go to the Form. Click Edit and go to the RELATIONSHIP pane under the ADVANCED tab. Click Add. Check the box for Dep-Emp-Type Validation_Value and click OK.
A relationship can be applied to a Row, Column, and/or specified filters. By default, it is not applicable to anything. We need to configure it based on our needs.
In this example, the Department filter should always have all departments listed as candidate options. The Employee Type filter should be controlled by the Department filter. This means we need to apply this relationship to Employee Type filter. To configure this, click on the settings icon , check the Employee Type box, and click OK.
Consider what would happen if we applied this relationship to both the Department and Employee Types. In that scenario, when Contract would be selected as the value for Employee Type, the candidate list for Department would not contain AMERICAS.
Another use of Linked Models is creating Models to store validation information. Dep-Emp-Type Validation and Emp Type-Metric Validation are both Models we created for Dimension relationship validation purposes.
Usually, these Models tend to be simple. They contain the Dimensions needed to define the relationship. For example, Emp Type-Metric Validation contains the Employee Type and Metric Dimensions only. We’ll use Emp Type-Metric Validation as an example to illustrate. Here we've created a Form to get all valid combinations.
A record in the Model means the combination is valid, otherwise it's invalid.
Emp Type-Metric is a Linked Model within HR Planning. We can use it to define relationships in Forms in the HR Planning Model. We can see relationship names contain two parts split by '_'. The first part is the name of the Linked Model. The second part is the Measure. In this example, the Emp Type-Metric Validation Model has two measures: Value and Validation.
Sometimes there is more than one relationship existing among the same Dimension group. In that case, instead of creating multiple Models with the exact same Model Dimensions to define these relationships, we can create additional Measures to store different validation information.