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.

illustration of how labels work

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.

    click new label
  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.

    fill in 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:

    check the new label
  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.

    open menu
  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.

    select attribute
  3. Click Convert.

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

    convert to label

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

    review the conversion
  4. Save your model.

Delete Label

Steps:

  1. Click the Details button.

    view details
  2. Find the label you wish to delete, click the ⋯ button and select Delete.

    delete label
  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.

    view details
  2. Find the label you wish to set as default view, click the ⋯ button and select Set as default view.

    set default view
  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:

illustration of sort by

Steps:

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

    click sort by
  2. Select the label you want to sort, choose ascending or descending sorting and click Save.

    select label and sroting

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

    verify sorting
  3. Save your model.