Skip to Content

Create Level-Based Hierarchies in SAP Datasphere

Create a level-based hierarchy, a hierarchy in a standard dimension that contains one or more levels of aggregation.
You will learn
  • How to create a level-based hierarchy in SAP Datasphere
jmmargojmmargoMarch 13, 2023
Created by
jmmargo
January 6, 2023
Contributors
jmmargo
meganhoy

Prerequisites

  • Step 1

    A level-based hierarchy is a hierarchy in a standard dimension that contains one or more levels of aggregation. They are rigid in nature, implying that the root and the child nodes can only be accessed in the defined order. The members of the hierarchy roll up into the next higher level in a many-to-one relationship, and members at this higher level roll up into the next higher level, and so on to the top level.

    In other words, the different levels of the hierarchy are kept in separate tables. Each level is fixed. These levels are linked to each other in a way that describes a special relationship: a level-based relationship. It is only used for level-based measures.

    For instance, a time dimension might have a hierarchy that represents data at the day, week, month and year levels. Each level above the base (or most detailed) level contains aggregate values for the levels below it.

  • Step 2
    1. In order to create a hierarchy within your dataset, you need to ensure that your uploaded CSV files have their datasets defined properly. Go into the Data Builder, and select your uploaded CSV file. Ensure that the data types of your target columns are of the right type.

      Data Builder
    2. The next step is defining your table as a dimension. A dimension is where you identify a set of master data attributes and keys for use in fact and consumption models. Hence, your table must be defined as such. On the same screen click on the Semantic Usage drop down, and select Dimension.

      Semantic Usage
    3. A hierarchy icon shaped like a staircase now becomes selectable on the top bar. Click on this icon to open the hierarchy settings.

      Hierarchy Icon
    4. Click on the + icon and select Level-based hierarchy.

      Level-based
    5. You can now define the business name, technical name as well as the different levels in your level-based hierarchy. In this example, the levels are defined as Region, Country, City and Street. Click on Close once done.

      Define names
    6. As always, first save and then deploy your dataset. Your dataset is now ready to be combined with analytical datasets to produce a clear and concise visualisation with well defined hierarchies.

      Save & Deploy

    Well done!

    You have completed the create hierarchies with SAP Datasphere tutorial group. Now it is time to continue learning. Please check out the other SAP Datasphere tutorials available here, and don’t forget to follow the SAP Datasphere tag in the SAP Community to hear about the most up to date product news.

  • Step 3

    Is a level-based hierarchy limited to two levels?

Back to top