Every calculation view has a Semantics node. You do not add this, it is already present and will always be the top node, regardless of the data category of the calculation view. In this node, you assign semantics to each column in order to define its behavior and meaning. This is important information used by consuming clients so that they are able to handle the columns appropriately.
One of the most important settings for each column is its column type. You can choose between attribute or measure.
In the semantic node, you can also optionally assign a semantic type to each column. A semantic type describes the specific meaning of each column and this can be helpful to any client that consumes the calculation view by enabling it to then represent the columns in the appropriate format. For example, if you define a column as a date semantic type, the front-end application can then format the value with separators rather that a simple string. The key point is that it is the responsibility of the front-end application or consuming client to make use of this additional information provided by the semantic type.
Semantic types for attributes can be defined as:
Amount with Currency Code
Quantity with Unit of Measures
Unit of Measure
Date – Business Date From
Date – Business Date To
Geo Location - Longitude
Geo Location - Latitude
Geo Location - Carto ID
Geo Location – Normalized Name
Semantic types for measures can be defined as:
Amount with currency code
Quantity with unit of measure
Apart from the semantic type there are other important settings that can be defined for each column such as the following:
Assigning a description column to another column - for example, assigning the product id column to a product description column so a user sees a value that is more meaningful.
Hiding a column - can be used if a column is only used in a calculation, or is an internal value that should not be shown, for example, hiding the unhelpful product id when we have assigned a description column that should be shown in its place.
Assigning a variable - allowing a user to select a filter value at runtime for the attribute
One of the most frequently maintained values in the Semantics node is the name and label of the column. It is possible to define an alternative name and label to any column so that it will make more sense to a user than what was originally proposed from the data source. For example, who wants to see the word MATNR in a business report column heading when we really should be seeing the words Material Number?
Column Properties in the Semantics Node
In the Semantics node, you can define and review the properties assigned to columns that are in the output of the top node.
|Property Name||See Lesson|
|Aggregation Type||See lesson Aggregation node|
|Conversion Function||Conversion functions used for inbound/outbound input parameters values (optional)|
|Data Masking||See lesson Masking Sensitive Data|
|Data Type||See Same Lesson|
|Hidden||See Same Lesson|
|Label Column||See Same Lesson|
|Semantics||See lesson Conversion, Same Lesson|
|Sort Direction||See Same Lesson|
|Type||See Same Lesson|
|Unconverted||See lesson Conversion|
|Variable||See lesson Using variables and input parameters|
|Default Value||See lesson Using variables and input parameters|
|Display Folder||Organize attributes into folders for BI metadata|
|Drill-Down Enablement||Property for calculated Columns|
|Hierarchy Default Member||See lesson Using Hierarchies|
|Keep Flag||See lesson Aggregation node|
|Key||Identifies key attributes, especially in DIMENSION calculation views|
|Mapping||Origin of the column (origin node name, column name)|
|Null Handling||Whether Null values in columns should be replaced with a specific default value|
|Presentation Scale||Whether a presentation scale must be applied|
|Transparent Filter||See lesson Aggregation node|