The FIX...ENDFIX command block restricts database calculations to a subset of the database. All commands nested between the FIX and ENDFIX statements are restricted to the specified database subset.
FIX (fixMbrs)
COMMANDS ;
ENDFIX
fixMbrs |
A member name or list of members from any number of database dimensions. fixMbrs
can also contain:
|
COMMANDS | The commands you want to be executed for the duration of the FIX. |
The FIX command is a block command that allows you to define a fixed range of dimensions or members to which the associated commands are restricted. The FIX command is often used to calculate a subset of the database. This is useful because it allows you to calculate separate portions of the database using different formulas, if necessary. It also allows you to calculate the sub-section much faster than you would otherwise.
The ENDFIX command ends a FIX command block. As shown in the example, you call ENDFIX after all of the commands in the FIX command block have been called, and before the next element of the calculation script.
Jan( IF (Sales) Actual=5; ENDIF;)
A OR B AND C
is the same as ((A OR B) AND C)
. However, if you use (A OR (B AND C))
, Analytic Services
evaluates the sub-expression in parentheses (B AND C)
before the whole expression, producing a different result.
FIX(@ATTRIBUTE(Can))
. You must use these functions; FIX(Can)
is not supported.
For example, using Sample Basic, assume this statement is in a calculation script:
.. FIX (@children(january))
CALC DIM
(Accounts, Product, Market)
ENDFIX
Since @children(january) is empty, the FIX is ignored, and the calculation operates on the entire database after issuing a warning.
Similarly, if a region defining a partition or a security filter evaluates to an empty set, Analytic Services issues a warning and behaves as if the region definition or security filter did not exist.
FIX (Budget) CALC DIM (Year, Measures, Product, Market); ENDFIX FIX (Budget, Jan, Feb, Mar, @DESCENDANTS(Profit)) CALC DIM (Product, Market); ENDFIX
The following example fixes on the children of East and the members on the Market dimension that have a UDA (User-Defined Attribute) of New Mkt.
FIX (@CHILDREN(East) OR @UDA(Market, "New Mkt"))
The following example fixes on the children of East that have a UDA (User-Defined Attribute)of New Mkt and the members on the Market dimension that have a UDA of Big Mkt.
FIX((@CHILDREN(East) AND @UDA(Market, "New Mkt")) OR @UDA(Market,"Big Mkt"))
©2004 Hyperion Solutions Corporation. All Rights Reserved. http://www.hyperion.com |