Define Measures and Add Business Information to a View
- What semantic information is
- How to define measures
- How to add business information
- How to change business names of measures and attributes
- How to change the semantic type of measures and attributes
- How to preview your modelled dataset
- You have graphically created your data model.
This tutorial is part of a mission, in which you try to help Best Run Bikes to to get a holistic view of their sales data by using the power of SAP Data Warehouse Cloud. You will get the sales data of Best Run Bikes and it is your mission to use the features of SAP Data Warehouse Cloud to help the bike suppliers make the best possible business decisions.
This mission consists of 8 modules that contain the necessary steps you need to follow in your mission to help Best Run Bikes:
- Sign up for trial.
- Get to know the SAP Data Warehouse Cloud interface
- Add users and assign roles
- Create your Space
- Import your datasets
- Create an entity relationship model
- Create a graphical view model
- You are here -> Define measures, business semantics and preview your data
You can also follow the steps in this tutorial by watching this video
- Step 1
Semantic information is simply a layer of information that is focused on providing a “translation” in business language to help all users understand each aspect of the data. Sometimes datasets can be hard to read for users who are not familiar with the way the data is structured, using a lot of abbreviations or acronyms. The semantic layer of SAP Data Warehouse Cloud can help you solve that issue by adding new column names, as well as defining the appropriate semantic type information for each column.
The following is a list of the potential semantic usage that you can determine for your tables and views:
- Relational Dataset - [default] Contains columns with no specific analytical purpose.
- Dimension - Contains attributes with master data like a product list or store directory, and supporting hierarchies (see Create a Dimension).
- Analytical Dataset - Contains one or more measures and attributes. This is the principal type of artefact used by analytical clients (see Create an Analytical Dataset).
- Text - Contains attributes used to provide textual content in one or more languages (see Create a Text Entity for Attribute Translation).
Though tables and views can both be identified with semantic usage, only views have the property Expose for Consumption, which makes them available to SAP Analytics Cloud and other analytical clients.
To be consumable as a model in SAP Analytics Cloud, your entity must be a view with:
- Semantic Usage set to Analytical Dataset (see Create an Analytical Dataset).
- Expose for Consumption enabled.
- At least one measure identified (see Measures).
- Step 2
Now it’s time to define measures in your data. If you need more information on what measures are, please see this help guide.
- Go to the Data Builder. You may need to select your appropriate space first.
- Click on the graphical view that you created earlier.
Change the semantic usage of this to Analytical Dataset in the Model Properties tab on the right-side of the screen. This will allow you to change attributes into measures.
It is necessary to define some of our columns as measures in order to create charts and graphs in SAP Analytics Cloud.
To convert an attribute into a measure, simply drag and drop the attribute into the measures area in the Model Properties tab. In this example, define
GrossAmount_Itemsas a measure.
GrossAmount_Ordersas a measure as well.
The system will not allow you to define dimensions as measures.
- Step 3
Next, add some more business information about the data model.
- Open the Business Purpose panel under Attributes.
- Here, fill in the description and purpose of this model, as well as the business contact person, responsible team and relevant tags.
- Step 4
You can also change the business names of measures and attributes. This is particularly useful if some of your data columns have names that wouldn’t be recognisable to your colleagues.
To do this, click on the pencil icon next to Attributes.
This takes you to an interface that allows you to type new names alongside the technical names. This doesn’t change the name of our column in the data itself, it just adds a business name in addition to it. You also have the option to add spaces or change column names to lowercase.
- Step 5
Another part of adjusting your semantic layer information is the opportunity to change the semantic type of your column. Semantic types identify that a column contains a value, a quantity, a date, geospatial or textual information, or another kind of semantic information.
For example, next to a column, open the drop-down list and find Geolocation - Latitude.
This tells the system specifically what kind of data is in the column, and is very useful when performing data analysis.
To add semantic types, you must set the semantic usage of your view or table to Dimension or Analytical Dataset.
- Step 6
Once you are done adding your semantic information and types, don’t forget to first save, and then deploy your view.
Click on the save icon on the top left corner of the screen.
Then, click on the deploy icon next to the save icon to deploy your model.
- Step 7
You have now successfully created, saved and deployed your analytical dataset.
If you wish, you can preview your data model by clicking on the data preview icon next to your output node.
The preview is limited to a maximum of 1,000 lines and, by default, to the first 20 columns in the table or view. You can also reorder, sort, or filter your columns according to your needs in the data preview section of the data builder.
Having successfully created a working data model, you can now help Best Run Bikes bring together information from different parts of their business to understand more about their sales. You can now use these data models to visualise your sales or transaction data, and subsequently draw insights and make better business decisions in your organisation.
Congratulations on finishing this mission and getting to know the basics of SAP Data Warehouse Cloud! To continue learning, please see the other tutorials and missions available here.
To be consumable as a data model in a data visualisation tool like SAP Analytics Cloud, the semantic usage of your entity should be set as