Organizing your data with proper hierarchical structures is important for any business. When you acquire data in SAP Analytics Cloud, you can enrich your data by creating hierarchies. In this blog, let us see how to create different hierarchies while building an acquired data model.

Level-Based Hierarchy

As the name implies Level-Based Hierarchies are used when your data has different levels of data. Some examples are Division > Region > State > City > Store and Product Category > Sub-Category > Product. In Level-Based Hierarchy, the upper levels will be properties of the dimension. For example, Category and Sub-category will be properties/attributes of the product. Each level is stored as a separate column within the model.

Consider the following example where you have order details data. It would be great to have the Product dimension in a Level-Based Hierarchy.

SAP Analytics Cloud – Hierarchies in Acquired Models

Creating a Level-Based Hierarchy while building a data model is easy. In our example, the hierarchy should be added to the dimension Product ID. So, Product Name is added as the Description. Then a Hierarchy is created using the Hierarchy button under Tools. The product ID is selected as the base dimension. Then additional levels are added by choosing the appropriate column names. Once the Hierarchy is created, all the higher level columns are automatically converted to attributes for the base dimension.

SAP Analytics Cloud – Hierarchies in Acquired Models
Creating Level Based Hierarchy

If needed, you can also choose the option ‘Generate a 100% unique bottom level for my hierarchy’ so that the bottom level is created with a unique id combining the higher-level information. This unique ID can avoid data discrepancies.

Once the model is created, you can see the Hierarchy dimension with levels representing different attributes.

SAP Analytics Cloud – Hierarchies in Acquired Models

Parent-Child Hierarchy

Parent-Child hierarchy can have only one attribute i.e. parent. And usually, the members within a parent-child hierarchy will be of the same type. For example, in an employee hierarchy, immediate managers will be the parent for each employee. Though you can have multiple levels, each member will have a parent or be a root member. While building a data model, if you have parent members in a separate column, you need to make it an attribute to the child dimension where you are going to create the parent-child hierarchy. Here in the example below, the manager column is added as a parent attribute to the Employee dimension.

SAP Analytics Cloud – Hierarchies in Acquired Models
Creating Parent-Child Hierarchy

Upon selecting the Hierarchy Management option within a model, you can use drag and drop feature to structure your parent-child relationships and even create multiple levels. Please note that all the members in the parent column are added as members to the main or child dimension with ‘<root>’ as its parent attribute member.

SAP Analytics Cloud – Hierarchies in Acquired Models
Changing Parent-Child Relationship within the model

If you don’t have parent information in a separate column or if you have created a blank model, you will be able to add parent attribute after the creation of the model under Dimension Settings. Once the attribute is created, you can import or enter data and use Hierarchy Management to structure parent-child relations.

If you are interested in learning more about SAP Analytics Cloud, check out our series of blogs here.


Corporate HQ:
5920 Windhaven Pkwy, Plano, TX 75093

+1 888-227-2794

+1 972-232-2233

+1 888-227-7192

solutions@visualbi.com


Copyright © Visual BI Solutions Inc.

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!

Share This!

Share this with your friends and colleagues!