In this article:
Setting Up Links Between Data Source and Data Consumer Dimensions
Examples of Work of Link between Data Source Dimensions and Data Consumer Dimensions
Data sources determine the objects, based on which a calculation block will be executed. The following repository objects can be used as data sources:
Data sources can be selected and set up on the Sources page in the calculation block editing wizard:
To select and set up a data source:
Click the Add button.
After executing the operation the Sources dialog box opens:
Select the object that will be used as a data source and click the Apply button.
To find object, start typing object's partial or full name in the search field. After executing the operation the side panel displays the objects, which names satisfy search conditions.
As a result, a data source is added. If required, similarly add other data sources.
Select calendar role. By default, a calendar is considered as a calendar dimension and it cannot be used to set up links. To work with calendar as a standard dimension, select the calendar checkbox located next to the data source name. Calendar will be displayed in the list of source dimensions and it can be used as a standard dimension. To use calendar as a calendar dimension, deselect the Calendar checkbox.
Set up links between data source and data consumer dimensions. The links set correspondence between data source dimensions and data consumer dimensions therefore reduce the number of calculated elements and speed up block calculation. To set up links, click the Set Up Links button. The Set Up Links dialog box opens to set links.
To automatically set up links by attribute identifiers in equal data consumer and data sources dimensions, click the ind All button.
As a result, the data source is added and set up. If required, similarly add other data sources.
To remove a data source:
Select the data source.
Click the Remove button.
NOTE. If the data source is used in calculation formulas, edit formula terms manually on removal:
After executing the operation the selected data source is removed.
The links set correspondence between data source dimensions and data consumer dimensions therefore reduce the number of calculated elements and speed up block calculation.
To set up links between data source and data consumer dimensions, use the Set Up Links dialog box. A link can be set up in simple and advanced modes. The dialog box appearance differs depending on the setup mode:
The Set Up Links dialog box opens in simple mode by default. To access advanced settings, toggle the Advanced Mode switch to active state.
The Source Cube Dimension column displays all source dimensions.
Setup order:
Select the attribute to be linked in the data source dimensions in the Source Attribute column.
Select the attribute in the data consumer dimension containing the same values as the selected source attribute in the Consumer Dimension and Attribute column. The list contains only consumer dimensions, for which filtering is set up.
For example, the Key attribute is selected in the Territories dimension. To create a correct link, in the data consumer select the attribute containing territory key in the dimension with corresponding data.
Select the link work option in the Behavior column:
Default. It is used by default. The linked data source dimension will contain only those selected elements, which have corresponding selected element in the linked data consumer dimension. If the corresponding element is not found in the data source, a calculation error is displayed.
Filter Consumer. The linked data consumer dimension will have only those selected elements, which have corresponding selected element in the linked data source dimension.
Empty Point if Element is not Found. The linked data source dimension will contain only those selected elements, which have corresponding selected element in the linked data consumer dimension. If the corresponding element has not been found in the data source, the Null value is used instead of it in calculation.
NOTE. The Behavior column is available only in the advanced setup mode.
Select the selection offset type in data source dimension in the Offset Type column:
Current Element. It is used by default. Selection is offset for each selected element obtained by the link.
First Element. Selection is offset only for the first selected element obtained by the link. Other elements are deselected. If selection by the link is obtained for the elements belonging to different parent elements, the selection is offset only for the first child element in each group of elements belonging to one parent element. Other child elements are deselected. If this offset type is used, the offset can be only positive or zero.
Last Element. Selection is offset only for the last selected element obtained by the link. Other elements are deselected. If the selection belonging to different parent elements is obtained by the link, the selection is offset only for the last child element in each group of elements belonging to one parent element. Other child elements are deselected. If this offset type is used, it can be only negative or zero.
NOTE. The Offset Type column is available only in the advanced setup mode.
Set the number of elements, by which data source dimension selection will be offset, in the Lag column.
NOTE. The Lag column is available only in the advanced setup mode.
As a result, the link by attributes between dimensions is set. If required, similarly add other attribute links.
To automatically add all possible links based on:
Attribute identifiers, click the Link by Identifiers button. Links are created for all equal dimensions in data sources and data consumers.
Links between dimensions, click the Fill by Dictionary Links button. Links are created for the dimensions that contain linked attributes.
To delete the link between attributes, click the Delete button in the Delete column next to the corresponding line.
The example displays functioning of the link with different behavior and offset. The dimension in used are abstract and are used to show how links work. The dimensions selection is based on MDM dictionaries that are basis for these dimensions.
For example, there is the Indicators dimension in the data consumer and the Countries dimension in the data source. The dimensions contain the following data and the following selection:
A link is set up between the Key attribute in the Countries dimension and the Country Code attribute in the Indicators dimension:
Consider the selection that will be used in the calculation block on different link behavior:
Default. The linked data source dimension will contain only those selected elements, which have corresponding selected element in the linked data consumer dimension. The calculation returns the error because the selection is not fixed for the Inflation, % element in the Countries dimension.
Selection obtained on behavior of a default link:
Filter Consumer. The data consumer linked dimension will keep only the selected elements that have a corresponding selected element in the data source linked dimension.
Selection obtained on data consumer filtering:
Empty Point if Element is not Found. The linked data source dimension will contain only those selected elements, which have corresponding selected element in the linked data consumer dimension. When calculation is executed by the Inflation, % element, the Null value will be used in the Countries dimension.
Selection obtained on replacing the not found element with empty values:
For example, there is the Indicators dimension in the data consumer and the Countries dimension in the data source. The dimensions contain the following data and the following selection:
A link is set up between the Key attribute in the Countries dimension and the Country Code attribute in the Indicators dimension:
Consider the selection that will be used in calculation block if the link uses the offset with different values:
Current Element. Selection is offset for each element obtained by the link.
The selection obtained on applying the offset by one element forward:
First Element. Selection is offset only for the first selected element obtained by the link. Other elements are deselected. If selection by the link is obtained for the elements belonging to different parent elements, the selection is offset only for the first child element in each group of elements belonging to one parent element. Other child elements are deselected.
Selection obtained on applying the offset from the first element by one element forward:
Last Element. Selection is offset only for the last selected element obtained by the link. Other elements are deselected. If the selection belonging to different parent elements is obtained by the link, the selection is offset only for the last child element in each group of elements belonging to one parent element. Other child elements are deselected.
The selection obtained on applying the offset from the last element by one element backward:
See also: