WITHATTR

Specifies the characteristics of a base-dimension member that match the specified values in a report script. You must create attribute dimensions in the database outline and associate them with a base dimension before you use WITHATTR in a report script.

Syntax

<WITHATTR (dimName, "operator", value)

dimName Single attribute dimension name.
"operator" Operator specification, which must be enclosed in double quotes ("").
The supported operators are:
> (Greater than)
>= (Greater than or equal to)
< (Less than)
<= (Less than or equal to)
= = (Equal to)
<> or != (Not equal to)
IN (Within a specified range)
value Value that, in combination with the operator, defines the condition that must be met. The value can be an attribute member specification, a constant, or a date-format function (for example, <TODATE).

These operators may behave differently depending on the attribute type with which you use them. See the table in Examples for more information.

Description

This command specifies two or more attribute dimension tags, which are associated with a base dimension that is defined in the database outline. If you use the <WITHATTR syntax, the command is applied only to a specific query in the report script.

Examples

Example 1

The following table shows examples, based on the Sample Basic database, for each type of operator:

> <WITHATTR(Population,">","18000000") Returns New York, California, and Texas
>= <WITHATTR(Population,">=",10000000) where 10,000,000 is not a numeric attribute member, but a constant Returns New York, Florida, California, Texas, Illinois, and Ohio
< <WITHATTR(Ounces,"<","16") Returns Cola, Diet Cola, Old Fashioned, Sasparilla, and Diet Cream
<= <WITHATTR("Intro Date","<=",
<TODATE("mm-dd-yyyy","04-01-1996"))
Returns Cola, Diet Cola, Caffeine Free Cola, and Old Fashioned
= = <WITHATTR("Pkg Type","= =",Can) Returns Cola, Diet Cola, and Diet Cream
<> or != <WITHATTR(Caffeinated,"<>",True) Returns Caffeine Free Cola, Sasparilla, Birch Beer, Grape, Orange, Strawberry
IN <WITHATTR("Population","IN",Medium) Returns Massachusetts, Florida, Illinois, and Ohio

Example 2

The following report script

<PAGE (Product, Measures, Scenario)
Florida Sales Actual

 <COLUMN (Year)
 <ICHILDREN Year

<ROW  (Market)
<WITHATTR(Population IN Large)
 !

returns on rows only those members of Market whose Population attributes map to ranges defined as Large:

                             Product Sales Actual 

                     Qtr1     Qtr2     Qtr3     Qtr4     Year 
                 ======== ======== ======== ======== ======== 

New York            7,705    9,085    9,325    8,583   34,698 
California         11,056   12,164   13,073   11,149   47,442 
Texas               4,505    4,589    4,807    4,402   18,303 

See Also

<ATTRIBUTE
<TODATE

©2004 Hyperion Solutions Corporation. All Rights Reserved.
http://www.hyperion.com