The Formula Builder tab is where you create the formula for your calculated field or measure. This tab includes the following:
| • | Formula entry box — Shows the current formula for your calculated field. You can edit the formula by typing directly in the panel, or using the operator buttons and the Fields and Measures and Functions selection lists. Formulas must use the following syntax: |
| a. | Labels for fields and measures must be in double quotes ("): "Customer ID", "Date ordered". |
| b. | Text must be in single quotes ('): '--'. |
| • | Operator buttons — Click these buttons to insert the operator in the Formula entry box. The operator buttons are described in detail in Operators in Ad Hoc Views |
| • | Fields and Measures list — Lists all the fields and measures currently in your Ad Hoc view, including any calculated fields or measures you have already created. Double-click a name on the list to insert it into the Formula entry box. Note that field and measure names must be enclosed in double quotes, for example, "Region". This is done automatically when you insert a field by double-clicking. See Calculated Field Syntax for more information on syntax. |
| • | Functions list — Lists all the available functions you can use in your formula. See Calculated Field Reference for more information. Double-click the name of a function to insert it in the Formula entry box. |
| • | Function Description panel — Gives a brief description of the function selected in the Functions list, if any. The sample inputs are intended to be as descriptive as possible. See Calculated Field Reference for the precise syntax each function requires. |
| • | Show arguments in formula checkbox — When this checkbox is enabled, double-clicking on a function name in the Functions list adds the full description to the Formula entry box; when the checkbox is disabled, double-clicking on a function name adds only the function. For example, double-clicking Round adds Round("NumberFieldName", Integer) when the checkbox is enabled, and adds Round() when the checkbox is disabled. If you enable this checkbox, you can double-click on a string, such as NumberFieldName, and then replace it by double-clicking a name in the Fields and Measures list. |
| • | Validate button — Checks the formula for syntax errors, such as missing parentheses or quotes. Your field must validate before you can create it. Syntax validation does not guarantee that your formula will give the results you want. |
The Summary Tab
Summaries show a result applied to all data values. For example, for a numeric fields such as Cost, the summary value might be the sum of all the costs; for a text field such as Customer Name, the summary value might be the count of all customers. The Summary tab lets you set the default summary function for your calculated field or measure.
| • | Calculation list — Displays allowed summary functions for your calculated field or measure. The available options depend on the data type of the calculation. See Summary Calculations for more information. Depending on your selection, you may see additional options: |
| • | Custom selection — Displays the same options available in the Formula Builder tab, including the Formula entry box, operator buttons, Fields and Measures list, Functions list, and Validate button. You use these options to build a formula for your custom summary. However, for summaries, you are limited to aggregate functions, that is, functions that operate on all the values in your field. For example, Sum and Mode are valid summary functions, because they use all available field values to get a result. Round is not a valid summary function, because it operates on a single value at a time. See Summary Calculations for more information. |
| • | Weighted Average — Displays a Weighted On drop-down list, which allows you to choose another field or measure to use as the weight for the average. |
Recommended Comments
There are no comments to display.