Managing a calculated field
Apply formulas to existing fields to create custom fields to generate data that you want.
Before you begin
- Use double quotation marks (") for labels in fields and measures. For example, "Customer ID" and "Date ordered".
- Use single quotation marks (') for text. For example, '--'.
- Use single quotation marks (') for levels. For example, 'ColumnGroup' and 'Total'.
About this task
Create a custom field and its corresponding formula to conduct queries. The following example describes a calculated field and formula.
Procedure
- Create an Ad Hoc view by clicking .
- In the Select Data wizard, click the View as tree icon.
- From the domain source list, select Audit Data Repository, and click Choose Data to open the Data Chooser window.
- In the Data Chooser window, select all of the sources from the source list, and click OK to open a new Ad Hoc View.
-
In the Ad Hoc view, hover over the drop-down icon next to Fields, and
select Create Calculated Field from the menu to open the New
Calculated Field dialog box.
The Formula Builder is displayed.
- Select Show arguments in formula if it is not already selected.
-
Enter a name for the field in Field Name.
For example, Russ email.
- In the Formula Builder tab, double-click User Email in the Fields and Measures list.
-
Double-click Starts With in the Functions
list.
The Formula box displays the text
"User Email" StartsWith("TextFieldName", 'string expression'). -
Edit this text as follows,
StartsWith('User Email', 'rsgo'). -
Click Validate to verify that the formula does not have any syntax
errors.
After you validate your formula, you can customize its summary calculation.
Creating a summary calculation
About this task
Procedure
- Click the Summary Calculation tab.
-
Select
Modefrom the Calculation menu. -
Click Create Field.
After you select Create Field, a new calculated field appears in bold text at the end of the list of available fields. Calculated fields are designated by special icons.