· 

Create a time hierarchy in SAP Datasphere

Update 01/2025

Name changed from SAP Data Warehouse Cloud to SAP Datasphere. Some links may break

Someone ask me how you could create a time hierarchy in SAP Datasphere (DSP) to use it in SAP Analytics Cloud (SAC). Because out of the box by just create the time dimension it isn't working right now. So here are the steps you have to make.

1. Create a new Space

First we create a new space and start from scratch.

SAP Datasphere Create new space
SAP Datasphere Create new space
SAP Datasphere Create space reyemsaibot.com
SAP Datasphere Create space reyemsaibot.com

After we created our new space and added our user to this space, we are able to create the time dimensions direclty in SAP Datasphere.

SAP Datasphere Add time dimension to space
SAP Datasphere Add time dimension to space
SAP Datasphere Create time dimension
SAP Datasphere Create time dimension

2. Data Builder and Upload an own file

Now we see in the Data Builder of the SAP Datasphere the time dimensions we just created. 

SAP Datasphere Data Builder
SAP Datasphere Data Builder

To show you an example I need to upload some example data. We use for this the CSV-File upload functionality of Datasphere. 

SAP Datasphere Import CSV File
SAP Datasphere Import CSV File

My example file here are the sales orders with a date in one column, so we can build our hierarchy.

SAP Datasphere Import CSV File
SAP Datasphere Import CSV File

3. Create a new graphical view

After I uploaded my files, we can create a new graphical view to associate our time dimension to our sales data.

SAP Datasphere Graphical View
SAP Datasphere Graphical View

As you see the view is very simple we just join the sales order header with the details. Now we can assign in the properties of the view element our time dimension.

SAP Datasphere Properties of View
SAP Datasphere Properties of View

Now we can select our association target and here we select the time dimension day and click OK.

SAP Datasphere Select association target
SAP Datasphere Select association target

Now we have to join our view with the time dimension. In my case I use the order date for my hierarchy.

SAP Datasphere Join between view and association target
SAP Datasphere Join between view and association target

As penultimate step of this view we define our view as an Analytical Dataset and expose it for consumption.  As last step we save and deploy our view to make it available in the SAP Analytics Cloud.

4. Create SAC Story

Now after we have deployed our view we can switch through the application switcher to the SAP Analytics Cloud.

SAP Datasphere Switch to SAP Analytics Cloud
SAP Datasphere Switch to SAP Analytics Cloud

We open via the menu our corresponding space and create a new story there.

SAP Analytics Cloud Browse Files
SAP Analytics Cloud Browse Files
SAP Analytics Cloud Create new story
SAP Analytics Cloud Create new story

Here we have to select our Analytical Dataset.

SAP Analytics Cloud Select Dataset
SAP Analytics Cloud Select Dataset

After we selected our Analytical Dataset, we choose for the demonstration a table to show the hierarchy.

Now we add the Order Date to our table and can select our corresponding hierarchy.

SAP Analytics Cloud Add dimension with hierarchy
SAP Analytics Cloud Add dimension with hierarchy
SAP Analytics Cloud Select Hierarchy
SAP Analytics Cloud Select Hierarchy

As you see our table shows the time hierarchy.

SAP Analytics Cloud Story with Table and Time Hierarchy
SAP Analytics Cloud Story with Table and Time Hierarchy

Conclusion

When you know where the options are, it is not heavy to build a time hierarchy in SAP Datasphere and use it in SAP Analytics Cloud. I hope this will help to get started with Datasphere. If you have any questions, feel free to ask in the comments.

author.


Hi,

I am Tobias, I write this blog since 2014, you can find me on Twitter, Facebook ,and YouTube. I work as a Data & Analytics Consultant. If you want, you can leave me a PayPal coffee donation. You can also contact me directly if you want.


Subscribe


  • In my newsletter, you get informed about new topics
  • You learn how to use Analysis Office
  • You get tips and tricks about SAP BI topics
  • You get the first 3 chapters of my e-book Analysis Office - The Comprehensive Guide for free
* indicates required

You want to know SAP Analysis Office in a perfect detail?
You want to know how to build an Excel Dashboard with your Query in Analysis Office? 
You want to know how functions in SAP Analysis Office works?

 

Then you have to take a look into Analysis Office  - The Comprehensive Guide. Either as a video course or as an e-book.


Write a comment

Comments: 2
  • #1

    Siva Prakash (Monday, 30 September 2024 13:29)

    Nice blog, are you able to consume the order date in a Timeseries chart after doing the Association?

  • #2

    Tobias (Tuesday, 01 October 2024 13:22)

    Hi,
    yes you can consume a the date in a time series chart.