![]() Previous |
![]() Next |
Within an aggregation specification, a MEASUREDIM statement identifies the name of a measure dimension that is specified in the definition of an operator variable or an argument variable.
Syntax
MEASUREDIM name
Parameters
The name of the measure dimension. A measure dimension is a dimension that you define. The dimension values are names of existing variables.
Note: You cannot specify a measure dimension when it is included in the definition of the aggmap object. |
Usage Notes
Defining a Measure Dimension
The following statement defines a dimension named MEASURE.
DEFINE measure DIMENSION TEXT
Populating a Measure Dimension
Once you have defined a measure dimension, you can then use a MAINTAIN statement to add dimension values to the MEASURE dimension.
The following statement adds the names of the sales
, units
, price
, and inventory
variables to measure
as its dimension values.
MAINTAIN measure ADD 'sales', 'units', 'price', 'inventory'
Using a Measure Dimension with an Operator Variable
The purpose of using measure dimensions is to take advantage of the flexibility of using non-additive aggregation operators. You can use measure dimensions in the definition of operation variables or argument variables.
The following statements show how to define an operator variable named opvar
and populate it.
DEFINE opvar TEXT <measure> opvar (measure 'sales') = 'SUM' opvar (measure 'inventory') = 'HLAST'
Examples
For an example of an aggregation specification that includes a MEASUREDIM statement, see Example: Using a MEASUREDIM Statement in an Aggregation Specification.