The Calculation Editor |
|
In the Analyser, three of the intermediary or advanced operators, the Filter, Formula and Aggregate operators require the setup of user defined formulae. To do so, they use a common window, the Calculation Editor. This allows a formula to be built, while drawing upon available fields, functions and operators.
# |
Feature |
||||||
---|---|---|---|---|---|---|---|
1 |
The formula is composed in the top pane. It may be typed directly into the pane, or available fields, functions and operators from the panes below may be inserted into it. The formula must have the correct syntax for the functions used. White space, including line feeds, in the formula may be used to make it easier to read and these are ignored when the formula is run. |
||||||
2 |
The relative size of each of the panes may be changed by clicking and dragging the resizers between them. |
||||||
3 |
The Fields pane contains a tree of all of the available fields for insertion in calculations. These are grouped in folders by entity type and, within each grouping, there may be further subgroupings of fields, until the fields are displayed. The available fields will vary, depending on:
It is recommended that available fields are double clicked to insert them into the formula box, to ensure that they are spelt correctly, surrounded by braces, etc, rather than typing them. |
||||||
4 |
A wide range of functions is available, with the required syntax displayed beside each, eg AvgX(expr, expr, ...). The functions are organised within folders, eg Mathematical, String etc. Each of the functions in the Calculation Editor, together with its syntax and example usage, may be accessed by clicking here. Functions may be typed or double clicked to insert them into the formula pane. |
||||||
5 |
The right most pane contains all of the operators that may be used when building a calculation, eg =, >, OR, &, etc. These are also grouped in folders, based on their type, eg Mathematical, Logical, etc. These may be typed in or inserted from the Operators pane by double clicking. |
||||||
6 |
When a specific item is clicked in the Fields, Functions and Operators panes, a brief description of the item is displayed below the three panes. For example, here the AnyTrue function is highlighted and a description informs you of its usage. Pressing F1 in the Calculation Editor will bring up on line help from which more detailed information is available about each field, function and operator. |
The three panes in the bottom part of the Calculation Editor all contain hierarchical folder structures from which you may draw fields, functions and operators. The following may be used to navigate and make selections from any of these panes:
|
Once you have activated the Calculation Editor window using the method appropriate to each of the Filter, Formula and Aggregate operators, you may define an expression using the correct syntax:
OR
The field will be inserted in the formula box with a set of curly brackets around it, eg {St.Family}.
The function will be inserted with a set of parentheses following the function name, eg DCountIf( ). The mouse pointer will be positioned within these parentheses and you must type in the correct arguments for the selected function.
A message box will appear, informing you of the reason for the invalidity of the operator.
|