![]() Previous |
![]() Next |
You can qualify any or all of a dimensions of a variable using either of the following techniques:
The QDR can temporarily limit a dimension of the variable by selecting one specified value of the dimension. This value can be outside the current status.
The QDR can replace a dimension of the variable with a less aggregate related dimension when you supply the name of an appropriate relation as the qualifier. The dimension is temporarily replaced by the dimension(s) of the relation.
For example, the variable sales
has three dimensions, month
, product
, and district
. You might want to compare total sales in Boston to the total sales in all cities. In a single statement, you want district
to be limited to two different values:
For the numerator of the expression, you want the status of district
to be Boston
.
For the denominator of the expression, you want the status of district
to be ALL
.
The following statement lets you calculate this result by using a QDR.
SHOW sales(district 'Boston')/TOTAL(sales)
You can qualify multiple dimensions of a variable. For example, when you qualify all the dimensions of the sales
variable by specifying one dimension value of each dimension, then you narrow sales
down to a single–cell value.
To fetch sales for Jun02
, Tents
, and Seattle
, use the following QDR.
SHOW sales(month 'Jun02', product 'Tents', district 'Seattle')
This statement fetches a single value.
You can use a qualified data reference with the target expression of an assignment (SET) statement. This lets you assign a value to a specific cell in a data object.
The following example assigns the value 10200 to the data cell of the sales
composite that is specified in the qualified data reference. When the composite named sales
does not have a value for the combination Boston
and Tents
, then this value combination is added to the composite, thus adding the data cell.
sales(market 'Boston' product 'Tents' month 'Jan99')= 10200