- 13 Jun 2024
- 3 Minutes to read
- Print
- DarkLight
Creating a Relationship
- Updated on 13 Jun 2024
- 3 Minutes to read
- Print
- DarkLight
This topic describes how to create a new Relationship and other available options.
Creating Relationships between Entities
In the Relationship page of a Data model, you see all of the Entities that have been created. To establish a Relationship between 2 Entities, drag and drop the parent Entity onto the chosen child Entity. For example, "Product Group" is a child of "Product Division", so you would drag "Product Division" onto "Product Group".
This mechanism is iterated automatically: if you drag an Entity onto another Entity which is already the parent of another, the former is automatically the parent of both the other Entities, directly and indirectly respectively. The Relationship tree is created and updated in real time as you drag and drop Entities.
Creating relationships between Entity members
Relationships between members can be assigned manually by selecting a new parent for every child member of 2 directly or indirectly related Entities.
To do so, proceed as follows:
Click on the desired child Entity in a Relationship
Select the parent Entity from the dropdown menu in the details panel. Each row in the details panel shows members of the child Entity paired with members of the parent Entity you have just selected
Click on a row to define a parent member for each child member in a dedicated selection window
You can edit one Relationship at a time using this method: if you want to edit multiple Relationships in bulk, you will have to use a Data Reader that reads hierarchical information from an external data source and applies it to the existing Entity members. See Data reader basic concepts for more details.
In a parent-child relationship, each member of a child Entity must have a parent contained in one or multiple parent Entities. For example, in the Customer→City relationship, each Customer must be related to a City. When an element in a parent-child relationship is missing, the member in the child Entity with no parent is called an orphan.
Since Relationships are what Board uses to aggregate data along the hierarchical tree, orphans should be avoided as they can cause data inconsistency. For example, if a customer is not related to any city in a "Sales Amount" Cube structured by Customer, when said Cube is aggregated by city the data of the orphan customer does not roll up into any city and this displays an incomplete value in a report. It is therefore important to ensure that there are no orphan members.
In a Relationship you should also avoid having members without a child, as this scenario could lead to a selection with no members in it: in this scenario, a report wouldn't display any meaningful data.
Refer to the following paragraph for instructions on how to identify and remove orphans and members without a child.
Analyze and Normalize
The ANALYZE and the NORMALIZE actions are available in the top left corner of the Relationships page.
Click on the ANALYZE button to have Board scan existing relationships for orphans. If any are found, they will be listed in the sliding panel on the right with some additional details about the missing relationship.
Click on each row to open the details panel: members with a missing relationship will be shown in orange.
You can use the DEFAULT button to fix the missing relationships for all affected members: just click on the button and select the member you want to assign to all incomplete relationships.
Click on the NORMALIZE button to create indirect relationships using direct relationships as a bridge. For example, in the hierarchy Customer→City→State, after having created the direct relationships Customer→City and City→State, you can use the Normalize function to automatically assign the indirect relationship Customer→State based on the 2 existing direct relationships.
Click on the NORMALIZE button to access the dedicated configuration panel: from there, you can choose the Entity used as a bridge and run normalization processes one by one clicking on the play icon to the left. You can also run multiple normalization processes in bulk, by selecting all desired rows and clicking on the "RUN SELECTED" button.
Click on the "SAVE" button to save the selected normalization options for later or for launching the normalization via a Procedure.
Read more about ANALYZE and NORMALIZE in Managing Relationships.
The NORMALIZE action is not available for Time Entities.