LINK
The Essbase Report Writer LINK command uses the AND, OR, and NOT Boolean operators, combined with extraction commands, to refine member selections.
Syntax
<LINK (extractionCommand [operator extractionCommand])
Parameters
- extractionCommand
-
Any of the following extraction commands or another AND/OR expression:
-
<ALLINSAMEDIM (member)
-
<ALLSIBLINGS (member)
-
<ANCESTORS (member)
-
<CHILDREN (member)
-
<DESCENDANTS (member [, gen/levelName [, AT|UPTO]])
-
<DIMBOTTOM (member)
-
<DIMTOP (member)
-
<IANCESTORS (member)
-
<ICHILDREN (member)
-
<IDESCENDANTS (member [, gen/levelName [, AT|UPTO]])
-
<IPARENT (member)
-
<MATCH (Dimension, match_string)
-
<MEMBER (member)
-
<OFSAMEGEN (member)
-
<ONSAMELEVELAS (member)
-
<PARENT (member)
-
<UDA (Dimension, UDA_name)
-
- Operator
-
Any of the following Boolean operators:
-
Use the AND operator when all conditions must be met.
-
Use the OR operator when either one condition or another must be met.
-
Use the NOT operator to choose the inverse of the selected condition.
-
Notes
-
NOT can only be associated with an extraction command, and does not apply to the entire expression. You must use NOT in conjunction with either the AND or OR operators.
-
The MEMBER extraction command is only used within a LINK expression; you can use the MEMBER selection to select a single member. Do not use the MEMBER command outside of a LINK expression.
-
You must select members from the same dimension, and all extraction command arguments must be enclosed in parentheses, as in the example above.
-
Essbase evaluates operators from left to right. Use parentheses to group the expressions. For example: A OR B AND C is the same as ((A OR B) AND C). In the first expression Essbase evaluates the expression from left to right, evaluating A OR B before evaluating AND C. In the second expression, Essbase evaluates the sub-expression in parentheses (A OR B) before the whole expression, producing the same result. However, if you use (A OR (B AND C)), Essbase evaluates the sub-expression in parentheses (B AND C) before the whole expression, producing a different result.
-
You can include up to 50 arguments in a LINK statement. For example, <LINK (A OR B OR (C AND D)) counts as four separate arguments.
-
All extraction commands within a LINK statement need to select from the same dimensions; a command such as LINK (<ICHILDREN (east) AND <LEV (product,0)) causes a syntax error.
-
If the LINK command returns an empty set of members, nothing is returned.
Example
<LINK (<UDA(product,Sweet) AND <LEV(product,0))
Selects all level 0 products that are sweet.
<LINK ((<IDESCENDANTS("100") AND <UDA(product,Sweet)) OR <LEV(product, 0))
Selects sweet products from the "100" sub-tree plus all level 0 products.
<LINK ((<IDESCENDANTS("100") AND NOT <UDA(product, Sweet)) OR <LEV(product, 0))
Selects non sweet products from the "100" sub-tree plus all level 0 products.
<LINK(<DESCENDANTS(Market,"Lev0,Market")
OR
(<DESCENDANTS(Market,"State")))
!
returns the following report (works on Sample Basic cube):Year Measures Product Scenario New York 8,202 Massachusetts 6,712 Florida 5,029 Connecticut 3,093 New Hampshire 1,125 California 12,964 Oregon 5,062 Washington 4,641 Utah 3,155 Nevada 4,039 Texas 6,425 Oklahoma 3,491 Louisiana 2,992 New Mexico 330 Illinois 12,577 Ohio 4,384 Wisconsin 3,547 Missouri 1,466 Iowa 9,061 Colorado 7,227