Total(Type: PivotEvaluatorElementType;
[Relation: Variant = Null;]
[Position: PivotTotalPosition = 0]): Variant;
None;
Type. Totals calculation method.
Relation. Dimension element, by which the calculated total must be obtained.
Position. Totals position (by rows or by columns).
The Total property returns total value.
The method is used in transformation formulas of analytical data area calculated elements. Only name of the Total method without the PivotClass class is specified in formula equations. Calling the method from macros in Fore/Fore.NET is not supported.
Use the Total method as a function in data transformation expression formulas.
The mandatory requirement for method working is enabling calculation of required totals for table rows or 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 total of the element, after which 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 the grand total calculated by the specified element.
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 (the calculated element is located by columns, and the PivotTotalPosition.Rows value is specified, and vice versa), the method returns total value by rows/columns respectively.
To create formulas and expressions, see the Creating Formulas and Expressions article.
The example of calculation element setup is given in IEaxDataAreaSlice.CalcTransformations.
Expression:
Total(PivotEvaluatorElementType.Sum, Null, PivotTotalPosition.Rows);
Result: the grand total located by rows as a sum of corresponding dimensions located above the calculated element.
Before:
After:
Application: it can be used in calculated element formulas.
See also: