Defining Additional Derived Data

Next, define other derived data in the same shelf set-up, and save it as derived data LifeExpXPop

  1. On the Dimensions shelf, place the following fields: un_region, un_subregion, and country.

    Add the derived data Pop to the Dimensions shelf. We do this because fields on the Measure shelf must be aggregated, but the definition of Pop already includes the summation over the population field.

  2. Place the field life_expectancy on the Measures shelf, and change the aggregate to avg(life_expectancy).

  3. Place the field year on the Filters shelf , and change the expression to [year]=<<year_param:2000>>.

    adding the derived data Pop to the dimension shelf
  4. Duplicate Derived data Pop in place, on the Dimensions shelf.
  5. Click the icon to the right of the cloned field, and in the dropdown, click Enter/Edit Expression.
  6. In the Enter/Edit Expression modal window, change the expression to [life_expectancy]*[Pop], and Save.

    editing expression to define other derived data
  7. Save the same field as derived data, named LifeExpXPop.
  8. Notice that in the Data menu, under Dimensions, you have a new category Derived Data that contains LifeExpXPop.

    viewing the new category Derived Data that contains the new field LifeExpXPop
  9. To check the definition of the saved derived data LifeExpXPop, click the down arrow to the right of its name, and click View Definition.

  10. The Derived Data Definition modal window appears. Note that the definition includes a parametrized filter for year, and the Pop derived data field.

    viewing the definition of the saved derived data
  11. Replace the field on the Dimensions shelf with the new derived data field, click Refresh Visual, and Save the application.

    The visual should look similar to this one. Note that we aliased the fields and made some changes to display formats:

    viewing the visual with the new derived data field