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:
- Our analytical view should look like this with joins:
- The join type is referential, with a cardinality of
1..N
(PRODUCT
toSALES
table). Join the tables as shown in the following screenshot: - Add to Output | SALES.CURR and PRODUCT.PRODUCT_TEXT.
- In the Semantics node, set the type for both columns to attribute. Select the hidden flag for the PRODUCT_TEXT attribute.
- In the Semantic node, define the type for AMT as Measure:
- Rename the measure (Rename AMT |
Total_sales...