Designing and Creating Dimensions

Objective

After completing this lesson, you will be able to create a dimension and hierarchy and explain dimensions, measures, dimension types, and properties.

Dimensions and Measures

In SAP Analytics Cloud, dimensions usually represent qualitative master data. Product, cost center, and employee are all examples of dimensions. A model can, and typically does, have several dimensions.

A measure represents transactional or quantitative data; for example, price, revenue, number of customers. Measures are distinct from dimensions, so you can add and configure multiple measures with aggregation and units to fit your data.

In an account-based model, all the numeric values are stored in a single default dimension usually named Account, and you use the financial account structure to determine what each value represents. You can also add calculations, specify units, and set aggregation types for those values. Semantically, an Account dimension type may be referred to as a measure because it fulfills a similar purpose; however, it is really a dimension.

A table of data with columns for dimensions and measures

Note

A measure-based model also supports the account-based single measure dimension, but you can add other measures to the model as well. With the account-based model, you are limited to the single account-type dimension to represent measures.

Private and Public Dimensions

Dimensions can be private or public.

Public dimensions are stand-alone entities that are created independently and can be shared among multiple models. If a model that contains a public dimension is deleted, the public dimension remains intact because it is not dependent on the model. If you copy a model that contains public dimensions, those dimensions are not duplicated, again, because they are not dependent on the model.

Typically, the values for the dimension members are imported into the dimension. Because the data is imported, it is often scheduled to repeat the import process on a regular basis to ensure that the dimension always reflect accurate information.

Private dimensions are created directly in a model, so they are model-specific and cannot be shared among other models. If the model containing the private dimension is deleted, the dimension is also deleted because it is part of the model. The same is true if you copy the model; the private dimension is duplicated in the copy.

Since the dimension is created during the model creation process, the data values for the dimension members are not populated until the data for the entire model structure is imported into it. And while data imports into models can be scheduled, the private dimension cannot be singled out for its own scheduled import.

The dialog when creating a public dimension and the dialog when creating a private dimension

Public dimensions are used much more frequently in SAP Analytics Cloud modeling than private dimensions simply because of their versatility. As independent entities, they can be managed and used much more easily than private dimensions. Private dimensions, however, are excellent choices for single- or infrequent-use situations.

Dimension Types

Dimensions are always qualified as a specific type. This Type qualification gives SAP Analytics Cloud information on how the dimension should function within the system. Depending on the type selected, you can configure various properties and possibly create hierarchies for the dimension.

When creating a public dimension, you can select the Account, Generic, and Organization type.

There are two other dimension types required by planning models that the system creates automatically for every planning model: Version and Date.

Create a public dimension and select either generic, organization, or account dimension type.

Account Dimension Type

The Account dimension type typically conforms to financial-type accounts or accounting-related data such as utility costs or number of product returns.

  • There are several system-generated properties, and more can be added.
  • The default hierarchy is system generated, and more can be added.
  • It is mandatory in an account-based model but optional in a measure-based model.
  • Only one per model

Generic Dimension Type

The Generic dimension type is used for any data that logically cannot be qualified as any other dimension type. You can also use the Generic dimension type if you need more than one of the other dimensions types in your model. For example, your model may need multiple dimensions related to an organizational structure, but since a model can have only one Organization dimension type, all the other organization-related dimensions can be qualified as Generic.

  • Properties can be added as needed.
  • As many hierarchies as needed can be added.
  • It is optional in a model.
  • More than one per model is allowed.

Organization Dimension Type

The Organization dimension type represents an organizational structure, such as cost centers, profit centers, or business units.

  • The Currency and Person Responsible properties are system-generated, and more can be added.
  • As many hierarchies as needed can be added.
  • It is optional in a model.
  • Only one per model.

Version Dimension Type

The Version dimension type is system-generated for all planning models and defines the data versions for planning activities: Planning, Actual, Forecast, etc.

  • Properties can be added as needed.
  • Hierarchies are not applicable to this dimension type.
  • It is mandatory (system-generated) in all planning models; not applicable for analytic models.
  • Only one per model.

Date Dimension Type

The Date dimension type is a system-generated dimension that defines the start and end dates of the model's time frame and specifies the granularity of time used in the model (years, quarters, months, weeks, or days).

  • Properties:
    • Account-based model: system-generated only.
    • Measure-based model: added as needed, but only when user-managed.
  • Hierarchies:
    • Account-based model: system-generated only based on calendar time but can be changed to fiscal time.
    • Measure-based model: added as needed, but only when user-managed.
  • It is mandatory (and system-generated) in all planning models but optional for analytic models.
  • More than one per model is allowed. It is helpful if you need to compare dates for different scenarios, such as Order Date versus Shipping Date.

Dimension Properties

Dimension properties have many uses in SAP Analytics Cloud. In stories, they can be used to sort and filter data or for currency translation calculations. They can also be displayed to provide additional information or clarity to the story.

The following example displays the Stores dimension with its properties.

Screen shot of the Stores dimension with its properties

Unique Properties for Dimension Types

Each dimension type has unique properties that are system-generated, and depending on the dimension type, you can easily add as many custom properties as you need.

Organization Dimension Type

The following properties are system-generated:

  • Currency
  • Person Responsible

These properties are used for currency conversion, data access control, data locking ownership, and to hide unauthorized hierarchy nodes.

The following example displays properties for the Organization dimension type.

SAP Analytics Cloud dimension table for Cost_Center as an example of an organization dimension type.

Account Dimension Type

The following example displays properties for the Account dimension type.

SAP Analytics Cloud dimension table for SAP_FI_S4HC_GLACCOUNT as an example of an account dimension type.

The following properties are system-generated:

  • Formula : Used to calculate values such as Gross Margin %.
  • Account Type : Used to allow sign reversal from positive to negative.
  • Calculated On
  • Aggregation Type*
  • Exception Aggregation*
  • Scale
  • Decimal Places
  • Units & Currencies
  • Hide

These properties are used for currency conversion, data access control, data locking ownership, and to hide unauthorized hierarchy nodes.

* There are many aggregation types available in SAP Analytics Cloud: average, last, first, rank, sum, etc. Aggregation behavior can be specified in account dimensions, calculated measures in stories, as well as a measure-based model.

Note

Member ID, Description, and Hierarchy appear as a columns in the member sheet, but they are not properties.

Generic Dimension Type

There are no system-generated properties, but you can add any that you need, and they can be used for currency conversion, data access control, data locking ownership, and to hide unauthorized hierarchy nodes.

Version Dimension Type

The Category property is system-generated.

This property is used for data access control and data locking ownership.

Date Dimension Type

There are many system-generated properties related to time such as Day, Week, Month, Day Name, and more.

These properties are used for time hierarchies and data mapping.

Hierarchies

A hierarchy is used to establish parent-child relationships within your data. For example, suppose you have sales data for the following:

  • Worldwide
  • Region
  • Country
  • State/Province
  • City

A hierarchy allows you to organize these geographic areas into logical levels (also called nodes), from the largest area to the most granular.

The hierarchy column in a dimension is used to store the parent-child values. You can add hierarchies by selecting +Add Hierarchy on the toolbar. When you choose this option, a new hierarchy column is inserted into the dimension, and you must enter the name of the new hierarchy.

The hierarchy is visualized in the Preview panel in the dimension. You can use drag-and-drop in the Preview panel to arrange the members and build the relationships. If more than one hierarchy has been defined, you can select the one you want to display in the preview from the drop-down list.

General Information About Hierarchies

Dimension types that allow more than one hierarchy can have either one or more level-based hierarchies or one or more parent-child hierarchies, but not a combination of both.

In an account-based model, the Account dimension type has only one system-generated parent-child hierarchy, but in a measure-based model, multiple account hierarchies are allowed.

For the Date dimension type, hierarchies are predefined based on the model granularity, and whether you have enabled fiscal time for the model. You can specify a default hierarchy in the settings for the date dimension. In a measure-based model, additional custom hierarchies may be added. We will cover custom time hierarchies in more detail later in the course.

The Version dimension type does not have a hierarchy, because different versions are independent from one another and do not have parent-child relationships.

Types of Hierarchies

Two types of hierarchy are available:

  1. Level-based hierarchy: A level-based hierarchy organizes multiple dimensions or properties into levels, such as country, state, and city.
  2. Parent-child hierarchy: A parent-child hierarchy organizes the members of a single dimension into a set of parent-child relationships.

Level-based Hierarchy

The following example shows dimensions with a level-based hierarchy.

Add a level-based hierarchy from dimension settings

Parent-child Hierarchy

The following example shows dimensions with a parent-child hierarchy.

Dimension member IDs with a hierarchy column and a hierarchical display

Parent-child hierarchies can be maintained manually in SAP Analytics Cloud or imported from files or SAP systems.

Note

When working with parent-child hierarchies for a planning model, avoid situations where data can be booked directly to a parent node.

These situations include the following:

  • Structuring two or more hierarchies so that a member is a leaf node in one hierarchy and a parent node in a different hierarchy.
  • Updating a hierarchy so that a leaf node that has a value booked to it is changed to a parent node.

Watch this video to learn how to create a level-based hierarchy.

Create the Stores Dimension, Hierarchy, and Properties

Business Example: You are creating a model for your team and you need to create a public dimension (as it will be used in multiple models) with a level-based hierarchy and custom properties. There is also a requirement to perform roll-ups and report by property values.

Task Flow: In this practice exercise, you will:

  • Create a public dimension.
  • Add properties to the dimension.
  • Use the hierarchy builder to add hierarchies to the dimension.