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.
  2. 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.
  3. Place the field life_expectancy on the Measures shelf, and change the aggregate to avg(life_expectancy).
  4. Place the field year on the Filters shelf , and change the expression to [year]=<<year_param:2000>>.
  5. Duplicate Derived data Pop in place, on the Dimensions shelf.
  6. Click the Down Arrow icon to the right of the cloned field, and in the dropdown, click Enter/Edit Expression.
  7. In the Enter/Edit Expression modal window, change the expression to [life_expectancy]*[Pop], and Save.
  8. Save the same field as derived data, named LifeExpXPop.
  9. Notice that in the Data menu, under Dimensions, you have a new category Derived Data that contains LifeExpXPop.
  10. To check the definition of the saved derived data LifeExpXPop, click the down arrow to the right of its name, and click View Definition.
  11. The Derived Data Definition modal window appears. Note that the definition includes a parametrized filter for year, and the Pop derived data field.
  12. 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: