Manage Labels

A label is an object that you use to apply additional descriptors to an attribute. Adding labels allow you to display an attribute in multiple different ways, or even as hyperlinks.

When you define an attribute in the LDM Modeler, it is added with a single label, which has the same name as the attribute itself. This label becomes the default label for the attribute. Every attribute has at least one label, and you can add more labels to it.

The following example shows how you can switch between two labels of the State attribute. You can either display the attribute as a name of a state or as its geolocation.

Comparison of a table showing state names vs. geolocation coordinates used as labels for the same State attribute in a revenue analysis, highlighting how label choice affects data display.

Types of Labels

Attribute labels can be of the following types:

  • Text holds a string of characters. For example, a text attribute label can store city names, product IDs, locations, and so on.
  • Hyperlink stores a fully qualified URL, which is automatically translated as an HTML link. Hyperlink labels are used, for example, when you enable drilling from metrics to URL addresses in a visualization (see Set Drill into Visualization).

Add New Label

Typically when you generate a new model, attributes start with only one default label. If you want an attribute to have multiple labels to choose from, you need to add them in the LDM modeler.

Steps:

  1. Click the ⋯ button on the attribute you want to add a label to and select Add label.

    A dataset in the Logical Data Model displays its data objects in a list. The ellipsis button next to each object's name opens a context menu. In this instance, the context menu for the State attribute is open, with the Add label option highlighted.
  2. Select the type of label you want to create, give it a name, select which field to map the label to and choose whether you want to set it as the new default view.

    Add label dialog for configuring a new label type, name, and map target. The Set as attribute's default view toggle is at the bottom of the dialog.
  3. Click Add label.

    The label is added to the selected attribute. You can view the label by going to More ⋯ > View details:

    The Fields tab of the dataset details dialog displays a list of data objects, each showing its associated labels. The State attribute is expanded to reveal two text labels: State, which is marked as the default label, and State Geolocation, which serves as an alternative.
  4. Save your model.

Convert Attribute or Fact to Label

You can convert an attribute or a fact into a label and assign it to another attribute. You can do this only for attributes or facts from within the same dataset. Attribute that acts as the primary key, and is used in another data set as a foreign key, cannot be converted to label.

Steps:

  1. Click the ⋯ button on the attribute or fact you want to convert and select Convert to label.

    A dataset in the Logical Data Model displays its data objects in a list. The ellipsis button next to each object's name opens a context menu. In this instance, the context menu for the State attribute is open, with the Convert to label option highlighted.
  2. Select which attribute or fact you want to assign the label to, the label type and choose whether you want to set it as the new default view.

    The Convert to label dialog with the options to select the Label type and Assign it to another data object. In this example, State is assigned to Region. The Set as attribute's default view toggle is at the bottom of the dialog.
  3. Click Convert.

    The attribute or fact is converted into a label and assigned to the selected attribute.

    The same dataset in the Logical Data Model displays its data objects in a list. This time, the State attribute is missing.

    You can view the converted label by going to More ⋯ > View details:

    The Fields tab of the dataset details dialog displays a list of data objects, each showing its associated labels. The Region attribute is expanded to reveal two text labels: Region, which is marked as the default label, and the newly converted State, which serves as an alternative.
  4. Save your model.

Delete Label

Steps:

  1. Click the Details button.

    A dataset in the Logical Data Model with the Details button highlighted at the bottom.
  2. Find the label you wish to delete, click the ⋯ button and select Delete.

    The Fields tab of the dataset details dialog displays a list of data objects, each showing its associated labels. Clicking the ellipsis button to the right of a label opens a context menu which includes the Delete button.
  3. Click Save changes.

  4. Save your model.

Set Label As Default View

An attribute has one label set as the default view. The default view label is used to display the attribute in visualizations, unless you explicitly choose to display the attribute using a different label (for example see step 7 in Create a Visualization).

Follow these instructions to change the default view of an attribute.

Steps:

  1. Click the Details button.

    A dataset in the Logical Data Model with the Details button highlighted at the bottom.
  2. Find the label you wish to set as default view, click the ⋯ button and select Set as default view.

    The Fields tab of the dataset details dialog displays a list of data objects, each showing its associated labels. Clicking the ellipsis button to the right of a label opens a context menu which includes the Set as default view button.
  3. Click Save changes.

  4. Save your model.

Sort Labels

Sorting by labels lets you control the order in which an attribute is displayed within a visualization. You can sort an attribute by a specific label in an ascending (A → Z) or descending (Z → A) order. An attribute can be sorted by only one label at a time.

The following example shows the effect sorting in a descending order has for the label State:

Two bar charts compare how state-level revenue data is displayed before and after enabling sorting. The top chart shows the default view with states arranged alphabetically from A to Z. The bottom chart shows the same data sorted in descending alphabetical order (Z to A), changing the visual order of bars while preserving their values.

Steps:

  1. Click the ⋯ button on an attribute and select Sort by.

    A dataset in the Logical Data Model displays its data objects in a list. The ellipsis button next to each object's name opens a context menu. In this instance, the context menu for the State attribute is open, with the Sort by option highlighted.
  2. Select the label you want to sort, choose ascending or descending sorting and click Save.

    Sort by dialog with dropdown to choose label and sorting order (ASC/DESC).

    You can verify the label is being sorted by going to More ⋯ > View details, sorted labels display a special icon:

    The Fields tab of the dataset details dialog displays a list of data objects, each showing its associated labels. A fiter icon to the left of a label indicates which label is sorted.
  3. Save your model.