Create Calculated Field

All users who have permission to create reports in Reporting 2.0 can create calculated fields. Fields are created from the Calculated Fields area of the Data panel in the report builder. See View My Calculated Fields.

However, to publish fields globally, users must have permission to manage global calculated fields. If a user does not have that permission, then the option to publish the field globally cannot be toggled on.

To create a calculated field, click the plus icon to the right of the Calculated Fields section in the report builder. This opens the calculated field editor. Inline help text appears for some fields on the editor when you hover over the field.

Step 1 - Enter Name/Description

Enter a name for the field in the Name field, up to 80 characters.

Enter a description in the Description field, up to 500 characters. Note: The description will be visible to all users if the field is a global field.

Step 2 - Select Output Type

The output type is the data type of the field. Select one of the following in the Output Type field:

  • Boolean
  • Datetime - When you select this option, you can also disable the Localize time zone toggle under Date Format. The toggle is enabled by default, which applies the report user’s local time zone automatically. When the toggle is disabled, Reporting 2.0 applies UTC time zone to date and time values in the calculated field.
  • Number - When this option is selected, you can also define a decimal point value between 0 and 10. The default value is None. Note: Selecting "None" in the Decimal Point drop-down means that no rounding should be applied.
  • String

Step 3 - Create Formula

The Formula field is where you create your formula for the calculation.

Step 4 - Publish Field Globally

This option is visible to users who have permission to manage global calculated fields. This option is off by default. Toggle it to on to set the field to publish globally once the field is saved.

A field that is published globally appears in the Global Fields section. Any user with permission to view the fields that were used to create the calculated field can:

  1. See the calculated field in the Global Fields section.
  2. Use the calculated field in a report.
  3. View the calculated field's data within the constraints of their permissions.

See View Global Calculated Fields.

Once a field is published globally, the field cannot be unpublished. The field can be deleted. See Edit, Copy, or Delete Calculated Field.

Step 5 - Validate and Save

You can validate your formula while building it or when the calculated field is saved. The Calculated Field Editor performs validations to ensure correctness and successful generation of reports with calculated fields.

To validate your formula while building it, click Validate. This prompts the following to occur:

  1. The formula is checked for errors.
  2. If the validation fails, an error message displays with the reason and suggestions for correcting the formula.
  3. If the validation succeeds, a "Success" message displays.

Click Save to save the field. If you have not yet validated your formula, the validation process will occur when you click Save.