Oracle® OLAP DML Reference 11g Release 1 (11.1) Part Number B28126-01 |
|
|
View PDF |
The NONE function returns YES
when none of the values of a Boolean expression are TRUE
. It returns NO
when any value of the expression is TRUE
.
Return Value
BOOLEAN or NA
if all the values of the expression are NA
Syntax
NONE(boolean-expression [CACHE] [dimension...])
Arguments
The Boolean expression to be evaluated.
Specifies slightly different internal behavior. Specify this keyword only when the original performance is extrememly slow.
The name of a dimension of the result; or, the name of a relation between one of the dimensions of boolean-expression and another dimension that you want as a dimension of the result.
By default, NONE returns a single YES
or NO
value. When you indicate one or more dimensions for the result, NONE tests for TRUE
values along the dimensions that are specified and returns an array of values. Each dimension must be either a dimension of boolean-expression or related to one of its dimensions.
Tip:
When you specify a dimension that is not an actual dimension of boolean-expression, but, instead, is dimension that is related to a dimension of boolean-expression and when there is more than one relation between the two dimensions, Oracle OLAP uses the default relation between the dimensions to perform the calculation. (See the RELATION command for more information on default relations.) When you do not want Oracle OLAP to use this default relation, specify the related dimension by specifying the name of a specify relation.Notes
The Effect of NASKIP on NONE
NONE is affected by the NASKIP option. When NASKIP is set to YES
(the default), and all of the values in the expression are NA
NONE returns NA
; if even one value is not NA
, NONE ignores all of the NA
values in the expression. When NASKIP is set to NO
, NONE returns NA
when any value of the expression is NA
.
Examples
Example 8-37 Testing for No True Values by District
Suppose you want to find out which districts had no months in which sales fell below $50,000. Use the NONE function to determine whether the Boolean expression (SALES
LT
50000
) is TRUE
for no months. To have the results dimensioned by district, specify district
as the second argument to NONE.
LIMIT product TO 'Sportswear' REPORT NONE(sales LT 50000, district)
The preceding statements produce the following output.
NONE(SALES LT 50000, DISTRICT DISTRICT) -------------- ---------- Boston NO Atlanta YES Chicago YES Dallas YES Denver YES Seattle NO
Example 8-38 Testing for No True Values by Region
You might also want to find out which regions had no months in which no districts had sportswear sales of less than $50,000. Since the region
dimension is related to the district
dimension, you can specify region
instead of district
as a dimension for the results of ANY.
REPORT NONE(sales LT 50000, region)
The preceding statement produces the following output.
NONE(SALES LT 50000, REGION REGION) -------------- ---------- East NO Central YES West NO