Creating an alias in DataLens

To add an alias for a pair of widgets:

  1. In the left-hand panel, click Dashboards and select the dashboard you need. If you do not have a dashboard, create one.

  2. At the top of the page, click Edit.

  3. Click Links.

    1. Select the first widget from the list.

    2. For the second widget, select a link type in the drop-down list.

    3. Next to the name of the second widget, click .

    4. Set up the alias:

      1. From both widgets, select the fields the alias is being created for. The fields in both widgets must be the same type.

        image

      2. Click Add.

    5. At the bottom of the Links window, click Save.

  4. At the top of the dashboard, click Save.

Example of linking

A chart named tutorial — Line chart is based on the tutorial dataset and a chart named tutorial 2 — Table is based on the tutorial 2 dataset.

image

1. Let's add a tutorial — Date selector of the Based on datasets type to the dashboard. In the selector parameters, select the tutorial dataset and the Date field. A link between the selector and the tutorial — Line chart chart is established automatically, since they are based on the same dataset.

image

2. Let's add a tutorial 2 — Manual input selector of the Manual input type to the dashboard. In the selector parameters, select the Calendar element type and the Date field.

image

3. Let's establish a link between the tutorial 2 — Manual input selector and the tutorial 2 — Table chart using an alias. When creating an alias, select the Date field in the selector and the Date 2 field in the tutorial 2 dataset.

image

As a result, the tutorial — Date selector filters the tutorial — Line chart chart, and the tutorial 2 — Manual input selector filters the tutorial 2 — Table chart.

image

4. Let's establish a link between the tutorial 2 — Manual input selector and the tutorial 2 — Line chart chart using an alias. When creating an alias, select the Date field in the selector and the Date field in the tutorial dataset.

image

Setting a link between the tutorial 2 — Manual input selector and the tutorial — Line chart chart links the tutorial 2 — Manual input and tutorial — Date selectors. This happens because the tutorial — Line chart chart and the tutorial — Date selector are based on the same dataset. As a result, any selector causes the appropriate values to be set automatically in the other selector and both charts' filters. To unlink the selectors, set their link type value to Ignore.

When adding an alias, make sure the field that the selector filters by is included in the dataset used to build the chart. Otherwise, the link will not work.

Example of invalid linking

When creating a link between widgets on a dashboard, you may encounter a situation when the link does not work. This usually happens when you create a link between a selector and a chart built from different datasets. The cause is a link between widgets based on a field not used to pick values in the selector:

1. There is a chart on the dashboard named Sample: Sales trends built from a dataset called Sample CH Sales.

image

There is a field in the dataset (chart) called ShopID which takes string values, such as sp-11, sp-18, and sp-23.

image

2. The Sample CH ShopList dataset serves as the store directory. It includes two fields: ShopID and ShopName.

image

3. We will add a selector on the ShopName field to the dashboard. The field contains the shop name (Tau, Zeta, Kappa) from the Sample CH ShopList dataset.

image

4. We will create a link between the selector and the Sample: Sales trends chart using an alias. It is not possible to create a link based on the store name since it is not included in the Sample CH Sales dataset used to build the chart.

image

Therefore, we will create the link using the ShopID field.

image

As a result, the values picked by the selector do not have any effect on chart visualization because the widgets are linked through the ShopID field, and the selector picks its values from the ShopName field.

Warning

At the same time, the values picked by the selector don't have any effect on chart visualization.

The link is illegal because you cannot use one field to pick values for a dataset-based selector and a different field as the target of a link between datasets. This link mechanism is not supported.