You are here: Dossier Authoring > Attributes, Metrics and Groups > Introduction to Attributes > Introduction to derived attributes

Introduction to derived attributes

You can create and add derived attributes to a dossier, based on dataset objects that already included in the dossier. You can combine the geographical region attribute with the state attribute to produce a result like Chicago, Illinois by using the Concatenation function. A derived attribute works the same as any other attribute. You can add it to a visualization, drag it into a text field to display it as a label, or use it as a filter.

You can easily create a derived attribute that:

You can also create more complex derived attributes, using the functions available in the Attribute Editor.

For instance, your dossier contains the Employee attribute, which contains separate attribute forms for the first name and last name of each company employee. An attribute form is a descriptive category for any data that you save about any of its attributes. You want to display the first initial and last name of each employee. You can create a derived attribute based on Employee, using the Concatenation function to combine the first letter of the first name and the last name. The derived attribute has the following definition:

Concat(Leftstr(Employee@FirstName,1),".",Employee@LastName)

When the derived attribute appears in a visualization, it displays each employee by first initial and last name.

You can use a derived attribute to turn a Salary metric into a Salary Range attribute.

Continuing with the example above, you can define the attribute's values as salary bands, such as 20K and 50K. Create a derived attribute with the following definition:

Concat(LeftStr(toString(Salary), (Length(toString(Salary))-4)), "0", "K")

To display the salary bands in thousands, change the definition to the following:

Concat(LeftStr(toString(Salary), (Length(toString(Salary))-3)), "K")

A derived attribute contains only the ID attribute form by default, but you can define additional attribute forms for the derived attribute. Any attribute forms besides the ID attribute form must be based on the value of the ID attribute form.

Sorting is one reason to create an additional form rather than another derived attribute.

For example, your dataset contains a Date attribute in the format MM/DD/YY. You need to display the days of the week rather than the date. You create a derived attribute that performs this transformation, returning values of Sunday, Monday, Tuesday, etc. You want Sunday, the first day of the week, to appear first, followed by Monday, etc. Create the derived attribute with the following two forms:

The derived attribute, when it appears in a visualization, sorts according to the ID form.

Related Topics

Managing dataset objects

Introduction to Attributes

Introduction to Derived Metrics

How to Create a Derived Attribute by Changing an Attribute's Data Type

Copyright Numerify, Inc. All Rights Reserved ©2021