Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Real Time Analytics with SAP Hana

You're reading from   Real Time Analytics with SAP Hana Enhance your SAP HANA skills using this step-by-step guide to creating and reporting data models for real-time analytics

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781782174110
Length 226 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Vinay Singh Vinay Singh
Author Profile Icon Vinay Singh
Vinay Singh
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Kickoff – Before We Start FREE CHAPTER 2. SAP HANA Data Modeling Approach 3. Different Ways of SAP HANA Data Load 4. Creating SAP HANA Artifacts Attribute Views and Analytical Views 5. Creating SAP HANA Artifacts – Analytical Privileges and Calculation Views 6. Understanding Text Search and Hierarchies in SAP HANA 7. Using Decision Tables and Transporting SAP HANA Content 8. Consuming SAP HANA Data Models 9. An Introduction to Application Function Library Index

Creating a restricted measure and a calculated measure


First of all, we will create a new analytical view (I hope you learned it well in the last chapter to do it yourself now). We will use two tables as the base table—sales and product (the table definition and sample data can be downloaded from Packt Publishing website). Re-verify that the structure of the table is as follows:

The following screenshot shows the Sales table:

The following screenshot shows the Product table:

Steps to create restricted measure and calculated measure:

  1. Our analytical view should look like this with joins:

  2. The join type is referential, with a cardinality of 1..N (PRODUCT to SALES table). Join the tables as shown in the following screenshot:

  3. Add to Output | SALES.CURR and PRODUCT.PRODUCT_TEXT.

  4. In the Semantics node, set the type for both columns to attribute. Select the hidden flag for the PRODUCT_TEXT attribute.

  5. In the Semantic node, define the type for AMT as Measure:

  6. Rename the measure (Rename AMT | Total_sales) in...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime