AttributeFilter (CalculationBlock)
You can use an AttributeFilter to limit the effect of a calculation to symbols that meet the filter condition.
Within a model, an AttributeFilter is embedded in a CalculationBlock, does not use the function keyword, and uses left braces as delimiters ( { ) containing the filter settings. Attribute filters can be used as AND or OR expressions. Attribute filters that immediately follow each other behave like AND expressions, and apply to the symbols that follow the expression. Attribute filters behave like OR expressions if the same symbol specification is used for two separate attributes.
Syntax:
CALCULATIONBLOCK (CalculationDim[;RestrictedDim] {"FilterType", "AttributeName", "FilterOperation", "Expression"}[, SymName])
//statements for this CalculationBlock End CalculationBlock
where:
- CalculationDim defines the dimension that will be used in the calculation statements.
- RestrictedDim is a dimension that will define a limited or restricted calculated DataArea.
- "FilterType" specifies the method to use to search the hierarchy for symbols matching the filter criteria and must be enclosed within double quotation marks. Select one of the following:
Value Description ALL
To find only the symbols whose attributes match the filter criteria, with no descendents.
PARENT
Starting from the top of the hierarchy, to find the symbols whose attributes match the filter criteria, including all descendents. This checks only parent symbols.
LEAF
Starting from the bottom of the hierarchy, to find the symbols whose attributes match the filter criteria, including all ancestors. This only checks symbols that are leaf symbols; that is, that have no descendents.
ROOT
Searching only the top of the hierarchy to find root symbols whose attributes match the filter criteria, including all descendents.
Syntax example:
CalculationBlock (Accounts; Entitites {"ALL", "ZGPNativeCurrency", "EQ" "CUSD"}, TENTITIES###)
End CalculationBlock