Skip to main content

Setting up derived attributes

Derived attributes are attributes whose data is "derived" from other attributes. For example, lets assume that the OrderDetails entity contains the attributes Quantity and UnitPrice but does not contain the attribute TotalPrice. To gain better insight into the annual sales figures, the organization would like to add the TotalPrice attribute to the model and derive its data from the Quantity and UnitPrice attributes.

Assuming that the Northwind sample database is the model’s source, this could easily be done as follows:

  1. Add the TotalPrice attribute domain to the model as described in Managing attributes.
  2. After finalizing the model, create the data warehouse tables as described in Creating the data warehouse tables.
  3. Click the OrderDetails mapping as described in Editing column mappings.

    Note that the TotalPrice attribute has no mapping as it was added after the Northwind source was discovered:

    Example Order Details mapping in data warehouse columns, with TotalPrice attribute selected and fx function icon visible to the right

  4. Open the Expression Builder by clicking the fx icon to the right of the TotalPrice column name. Then, in the Expression Builder, add the Quantity and UnitPrice columns to create the following expression:

    Quantity*UnitPrice

    For more information on creating expressions, see Creating expressions.

  5. Click OK to close the Expression Builder and save the expression.

    The Quantity and UnitPrice landing zone columns are now mapped to the TotalPrice data warehouse column. Notice that the mapping lines are gray, indicating that the mapping is the result of an expression.

    Example Order Details mapping in data warehouse columns, with gray mapping lines connecting the TotalPrice attribute to the landing zone columns on the left side

    Hovering the mouse cursor over the gray lines highlights the derived column (TotalPrice) and the columns from which its data is derived (Quantity and UnitPrice).

    Example Order Details mapping, with the mouse cursor positioned over the gray lines and all elements linked to the TotalPrice attribute highlighted

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!