Hierarchical expressions
When you use the hierarchical HDATA view of the data, the UNICOM Intelligence Data Model presents the data in a set of hierarchical virtual tables, which are called levels. The structure of the levels in the case data matches the structure of the loops and grids in the metadata. The UNICOM Intelligence Data Model evaluates each expression at a particular level, which is called the level of the expression. How the level of the expression is determined depends on the use of the expression. For example, when you create a filter in UNICOM Intelligence Reporter or table scripting, you explicitly set the level of the expression; when you use an expression in a derived variable, the level of the expression is determined by the position of the variable in the metadata loop structure (defined internally in the MDM Fields collection); and when you use an expression in a sub-select statement in an SQL query, the level of the expression is the level of the sub-select statement.
You must make sure that all of the variables you use in an expression are at the same level as the expression.
▪You can include variables from a higher parent level by down-leving the data. Down-leving expands higher-level data so that it can be represented at a child level.
▪You can include variables from a lower child level by up-leving the data. Up-leving collapses data from a lower level so that it can be represented at a parent level.
In addition, all of the identifiers must be specified relative to the level of the expression.
The examples in this topic are based on the Household sample data set, which provides an example of complex hierarchical data. The following diagram shows the levels structure in the Household sample.
Note that each case at the top level corresponds to a household. For more information about the household sample, including details of the questionnaire logic and the variables at each level, see
The Household sample.
See