Creating formulas

Objectives
After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Explain calculations created for import models
  • Create calculated measures in a model

Dimension formulas

Dimension member formulas

Dimension member formulas are configured in account dimensions to perform on-the-fly calculations such as gross margin % or labor as a percent of total operating cost. Here are some other key features of dimension member formulas:

  • You can use dimension member formulas to calculate account values that are restricted to other dimension member values such as prior year revenue.
  • A dimension formula is available any story that uses a model that contains the account dimension with a formula.
  • An account dimension formula can be used as-is (from the dimension) or they can be modified in specific models. In this scenario, the model can contain its own version of the dimension formula.
  • You can also use dimension member formulas to calculate account values that are restricted to other dimension member values such as prior year revenue.
  • Dimension member formulas can be viewed in stories by displayed the formula bar.

Dimension formula example - calculate labor as a % of total cost

Create a dimension member formula:

  1. Add a formula into the account dimension
  2. View it in a story
Using the advanced formula editor to insert a formula that can then be seen in the table created in a story. In this example, Labor as a percentage of total cost calculated at 18.64%.

Calculated measures

Model-based calculated measures

You can add measures to the model so that you don't have to create them in stories. These are calculated on the fly (the results aren't stored. Because they aren't stored, calculated measures do not appear in the data foundation view.

  1. Go to the calculated workspace
  2. Add the new measure
  3. Create the formula
  4. Preview the results
Model-based calculated measure example for price = revenue / quantity

Calculated measure aggregation settings

Calculated measure aggregation settings prevent unwanted summation, for example, the default aggregation (sum) is fine for a calculated measure like: Revenue = Price x Quantity.

In the example below, however, the calculated measure is: Price = Revenue / Quantity, and the summation is not valid. To avoid summation, the exception aggregation type is set to None and the exception aggregation dimensions is set to Date and store.

Measure properties. In the example, the exception aggregation fields are highlighted as Exception aggregation type is non and Exception Aggregation Dimensions is set to date and stores.

Create calculated measures in a model

Task 1:

Business example

You need create calculated measures into an analytic new model for price and gross margin percentage.

Task flow

In this practice exercise, you will complete the following tasks:

  • Create calculated measures
  • Create a story using your model

Save progress to your learning plan by logging in or creating an account

Login or Register