Using Calculations in a Story Report

Objective

After completing this lesson, you will be able to use calculations in an SAP SuccessFactors Story Report.

Calculation Editor Overview

The Calculation Editor allows you to create calculations for use in a chart or a table.

You can display the calculation in a cross-tab table by selecting it in the Measures filter applied to the dimension. In a chart, calculations can be added directly as new measures.

Screenshot of the calculation editor, showing the calculation type and name.

The following calculation types are supported:

Calculation Editor Overview

TypeDescription
Calculated measuresPerform a calculation on measures, dimensions, or other calculations.
Restricted measuresReturn data that excludes certain members of one or more dimensions.
Aggregation

Create calculations from aggregations such as sum, count, average, and so on. Choose what conditions are required for the aggregation to be applied, and when the conditions are required.

Date DifferenceCalculate the time interval between two dates.
Dimension to MeasureConvert a dimension to a measure.
Running TotalCreate running total calculation.

Calculation Editor for Measures

Navigating to the calculation editor depends on whether you are using a chart or a cross-tab table.

For a chart, complete the following steps:

  1. Select a chart.
  2. In the right panel, select + Add Measure.
  3. Under the Calculation Heading, choose + Add / Create Calculation.

For a table configured as cross-tab, complete the following steps:

  1. Select the table.
  2. In the right panel, locate the measure item.
  3. Select the more actions (three dots icon) command to the right of the members.
  4. Select Add Calculation or Edit Calculations to manage the calculations.
Navigating to the calculation editor, as described in the preceding text.

Aggregation Calculation

Calculations can be created from aggregations such as sum, count, average, and so on. When you create an aggregation, you can also choose what conditions are required for the aggregation to be applied, and when the conditions are required. For example, you can create an aggregation to count the number of employees that have a certain employment status.

Screenshot of a sample aggregation calculation.

To create an aggregation, complete the following steps:

  1. Navigate to the Calculation Editor for Measures.
  2. From the Type list, select Aggregation.
  3. Enter a Name for the aggregation.
  4. Select an aggregation Operation.
  5. In the Measure section, select a Measure from the list.
  6. In the Aggregation Dimensions section, select one or more of the dimensions to which you want to apply the aggregation.
  7. (If necessary) Select Use conditional aggregation. Conditional aggregation allows you to specify when the aggregation is applied and what conditions are required for the aggregation to be applied.
  8. Choose OK.

Restricted Measures Calculation

You can create a measure that restricts the data from a member by excluding certain members of one or more dimensions.

Create a restricted measures calculation, as described in the text.

Restricted measures can be useful for comparing one value to a set of other values in the same chart or table - for example, you can create a measure that compares the counts of employees with different employment characteristics (part-time versus full-time).

To create a Restricted Measure, complete the following steps.

  1. Navigate to the Calculation Editor for measures.
  2. Select Restricted Measure from the Type list.
  3. Enter a name for the restricted measure.
  4. In the Measure section, select a measure from the list.
  5. In the Dimensions section, select one or more dimensions along which you want to restrict the measure.

    If you want to restrict the measure along more than one dimension, use Add a Dimension.

  6. Beside each dimension, under Values or Input Controls, select Click to Select Values, and then choose an option from the list: the options in the list will vary by dimension.
  7. (Optional) Select Constant Selection. View the description in the next paragraph.
  8. Select OK.

Constant Selection

When Constant Selection is enabled, the restricted measure value is determined by the values you specify in the Calculation Editor and will remain constant. Enabling constant selection is useful for comparing a single value with several different values.

Date Difference Calculation

Create a calculation that shows the time interval between two dates. Your model must have Date columns.

To create a Date Difference Calculation, complete the following steps:

  1. Navigate to the Calculation Editor for Measures.
  2. Select Date Difference from the Type list.
  3. Enter a name for the calculation.
  4. In the Properties section, select values for Result Granularity, Time (A), and Time (B).
  5. (If Required) Adjust the Dimension Context: This is used to determine the context under which the difference is calculated.

    The time dimensions used for (A) and (B) are always required. You can add additional dimensions as needed to influence the average or sum result aggregation operations.

  6. Select a Result Aggregation Operation.
  7. Select OK.
Create a date difference calculation, as described in the preceding text.

Calculated Measure Calculation

The Calculated Measures calculation creates a new measure by applying mathematical formulas to the data.

Measures are numerical values on which you can use mathematical functions. When you are setting up your calculation, you will apply the typical formula functions, conditions, and operators to the data contained in your model.

Screenshot of the Calculation Editor, showing a sample formula.

To create a Calculated Measure, complete the following steps:

  1. Navigate to the Calculation Editor for Measures.
  2. Select Calculated Measure from the Type list.
  3. Enter a name for the calculated measure.
  4. Enter a formula in the Edit Formula area. This is covered in the next topic.
  5. If you want to verify that your formula is formatted correctly, select Format: it may reformat your formula before displaying a valid formula message.
  6. Select OK.

You can add preset functions, conditions, and operators, by selecting options in the Formula Functions list. Only certain functions, conditions, and operators are available for creating calculated measures. These are documented in the Topic Creating Calculated measures in the Document SAP Analytics Cloud Help on the SAP Help Portal.

There are a variety of shortcuts that you can use when working with the Calculation Editor.

Working with the Edit Formula Area

ShortcutAction
Ctrl + Space barDisplay a list of possible formulas
[Returns all relevant measures

When using the measure list ([), you see both the measure ID and the measure description. When you select a measure, the formula editor area shows only the measure ID. To view the measure description, click outside the formula editor area.

Dimension Creation from a Measure

There is a calculation type that lets you convert a dimension to a measure.

To create a dimension from a measure, complete the following steps:

  1. Navigate to the Calculation Editor for Measures.
  2. Select Dimension to Measure from the Type list.
  3. Enter a name for the calculated measure.
  4. From Dimension Attribute to Convert, select a dimension.
  5. Select context dimensions.
  6. Set the aggregation operation type.
  7. Select OK.
Screenshot of the Calculation Editor. Dimension to Measure is selected as the type.

Interaction: Use Calculations

Business Example

In this exercise, you will use three types of calculations that generate measures.

Summary