Custom calculated fields in Sugar Discover

In Sugar Discover, users can create calculated fields either at the report level or the dataset level. Report-level calculated fields are specific to the report they are created in, while dataset-level calculated fields can be reused across any report using the same dataset. For now, we'll focus on report-level fields.

To create a report-level calculated field, click the plus icon to the top right of the Fields list.
disocver_calc_plus
While creating a calculated field, users must provide a unique name, define the calculation using functions, operators, and field references (which are fields enclosed in square brackets), and optionally add a description. As you write the calculation, you will see whether your calculation is valid by the text in the lower left corner of the field definition box.
Discover_calc_valid
The calculation’s format can be customized using the "Format Type" dropdown, with options varying based on the data type, such as currency. Additionally, the "Default Aggregation" dropdown controls how Discover aggregates results in reports. Users can override the default aggregation when adding the field to a report’s shelf using the Default Aggregation dropdown. After defining the calculated field, users may click "Apply" to save it, or "Cancel" to discard changes. The newly created calculated field will appear in the Fields list.

For help with syntax, examples of calculated fields, and to view a list of available functions and operators, please see our Sugar Discover Function Reference.

Do you want to discuss this tip with other SugarClub members? Do you have your own tips to share? Ask a question or start a conversation in the SugarClub Help Forums!