SubTotal(Type: PivotEvaluatorElementType;
[Relation: Variant = Null;]
[Position: PivotTotalPosition = 0]): Variant;
None;
Type. Subtotal calculation method.
Relation. Element of the dimension, by which calculated subtotal must be obtained.
Position. Total location (by rows/columns).
The SubTotal method returns subtotal value.
The method is used in transformation formulas of analytical data area calculated elements. Only name of the SubTotal method without the PivotClass class is specified in formula equations. Calling of the method from macros in Fore/Fore.NET is not supported.
The mandatory requirement for method working is enabling calculation of required totals for table rows/columns. If totals are not calculated, the method returns empty values.
The Relation parameter is optional. If the parameter is not specified, the method returns subtotal of the element, after which a calculated element is created. As a value of the Relation parameter it is required to specify element of the dimension, for which a calculated element is created. On specifying the Relation parameter, the method returns a subtotal calculated by the specified element. If there are several dimension in the heading/sidehead, the subtotal is taken by the last dimension of heading/sidehead.
The Position parameter is optional. If the parameter is not specified, or the value matches the location of created element, the method returns total of the element, for which transformation formula is set. If the value is specified that is opposite to calculated element location (calculated element is located in columns, and the PivotTotalPosition.Rows value is specified, and vice versa), the method returns subtotal value by rows/columns respectively.
See also: