Page tree
Skip to end of metadata
Go to start of metadata

This section describes how to create a calculated field:

To create a calculated field, complete the following steps:

  1. First, create the Ad Hoc view to use. To do this, select  Create > Ad Hoc View from the  Home page. The  Select Data wizard appears. 

  2. Click the  View As Tree icon  and navigate to  Domains

  3. Select a Domain, then click the  Choose Data button. The  Data Chooser window appears. 

  4. In the  Data Chooser window, select your desired fields, pre-filters, and display settings, then click the  OK button. A new Ad Hoc view opens. 

  5. In the Ad Hoc view, hover over the  Detail Selector icon  at the top right of the  Fields section of the  Domain Selection panel and select  Create Calculated Field from the context menu. 
    The  New Calculated Field dialog box appears, displaying the Formula Builder: 

  6. In the  Field Name field, enter an appropriate name for your Calculated Field. 

  7. Create the formula:  

    1. Labels for fields and measures must be in double quotes ("): "Customer ID", "Date ordered". 

    2. Text must be in single quotes ('): '--'. 

    3. Levels must be in single quotes ('): 'ColumnGroup', 'Total'. 

    4. Make sure  Show arguments in formula is selected. 

    5.  As an example, if you were to create a formula that states the difference in days between a student's enrollment and course-start date: 

    6. In the  Functions list, double-click on  ElapsedDays. Because  Show arguments in formula is selected,  ElapsedDays("DateFieldName1", "DateFieldName2") is entered in the  Formula Builder

    7. In the  Formula box, double-click  DateFieldName1 to select it, then double-click  Date Enrolled in the  Fields and Measures list to replace the selected formula value. The Formula Builder displays  ElapsedDays("Date Enrolled", "DateFieldName2"). Repeat for the second value. 

    8. Click the  Validate button to verify that the formula does not have any syntax errors. 

The Ad Hoc Editor creates a default summary calculation based on the type of formula you have entered. This section shows how to select a different summary function. 
To create a summary calculation, complete the following steps:

  1. After creating your formula on the Formula Builder tab, click the  Summary Calculation tab. 

  2. Select  Mode from the  Calculation menu. 

  3. Click the  Create Field button. The calculated field appears at the bottom of the list of available fields. A special  Calculated Field icon  indicates it is a calculated field, and its name on the list is bolded.

  • No labels