Oracle® OLAP DML Reference 10g Release 1 (10.1) Part Number B10339-02 |
|
|
View PDF |
The $COUNTVAR property specifies that Oracle OLAP counts the number of leaf nodes that contributed to an aggregate value when an AGGREGATE function executes. Leaf nodes that are NA
are not included in the tally. Indicates that the number of leaf nodes that contributed to an aggregate value are counted. When calculating the data in a variable, Oracle OLAP checks to see if the variable has an $COUNTVAR property and, if it does, counts the number of leaf nodes that contributed to an aggregate value.
Note: The $COUNTVAR property is only one way in which you can specify that Oracle OLAP should count the number of leaf nodes that contributed to an aggregate value when an AGGREGATE function executes. You can also specify this by including a COUNTVAR phrase in the AGGREGATE function. |
Syntax
You add or delete a $COUNTVAR property to the most recently defined or considered object (see DEFINE PROGRAM and CONSIDER) using a PROPERTY statement with the following syntax.
PROPERTY {addproperty | deleteproperty}
where
addproperty has the following syntax.
deleteproperty has the following syntax.
Arguments
A TEXT
expression that specifies the name of a previously defined AGGMAP type aggmap object.
Using $COUNTVAR
For a variable named v1
, the following statements cause Oracle OLAP to count the number of leaf nodes that contributed to an aggregate value that is the result of the execution of the myaggmap
aggmap object by a AGGREGATE function.
CONSIDER v1 PROPERTY '$COUNTVAR' 'myaggmap'