## Overview

Calculated fields allow you to create basic calculations with the fields available in your report. The calculated field option will create new unique fields for your report.

**Note:** a calculated field that you create cannot be used across multiple reports. It is unique to your report only. If you create a set of calculated fields and you wish to use them across more than one report you can either:

- Request the calculations to be included in the view by your administrator or
- Copy the template report containing the calculations using the copy functions – the copied report will contain the new calculated fields as well.

### Why Use Calculated Fields?

When an administrator designs your reporting view they do not have the capacity to create all the variables that you are likely to need in the course of your report writing. The intention of a view is to provide you with sufficient fields for you to be able to write the report you need and to use some of these fields as the basis for more complex calculations.

You create calculated fields when you need to derive data from fields such as ratios or subtractions. For example if you wish to know the ratio of outstanding invoice amounts. For this you may need to divide the amount received with the amount invoiced.

## Add a Calculated Field with the Formula Builder

- Click the Add calculated field link located at the bottom of the data fields panel.

- A calculated field popup will open. Insert a name for your new column. And use the formula builder to build your calculation.
- Choose a ‘Simple Formula’ from the formula type drop down.
- Select the fields you want to add to the calculation. The report fields list shows you all the fields you have currently added to your report.
- Use the +-*/ () buttons to add in the arithmetic calculations.
- Yellowfin will not permit you to select combinations of variables that are incompatible – therefore options that are greyed out will become active as you add in elements.

- You can validate your calculation to determine whether it will work correctly. Click the validation link to do this.

- Click OK to save your new calculated field. It will now be available in a folder called calculated fields. You will have to drag the new field from the Calculated Fields folder onto your report.

## Create a Calculation using a Predefined Formula

Using a pre-defined formula you can add calculation to your report that will be based on formula rules.

- Click the Add calculated field link located at the bottom of the data fields panel.
- A calculated field popup will open. Insert a name for your new column. And use the formula builder to build your calculation.
- Choose a ‘Pre-Defined Formula’ from the formula type drop down.
- Choose the formula you wish to apply – the selection is specific to the type of database that your data is sourced from.
- Once you have chosen your formula you will be prompted to select the appropriate fields for the formula.

- You can validate your calculation to determine whether it will work correctly. Click the validation link to do this.
- Click Save & Close to save your new calculated field. It will now be available in a folder called calculated fields. You will have to drag the new field from the Calculated Fields folder onto your report.

## Edit a Calculated Field

- To edit a formula for a calculated field open the Calculated Fields folder.
- Select the field you wish the edit. It should be highlighted and an edit icon will be visible at the right of the field’s name.
- Click the edit icon and the formula popup will open.
- Edit your formula and click OK when completed to close the popup and save your changes.

## Delete a Calculated Field

To delete a calculated field from your report entirely

- Select the field from the calculated field category
- Click the edit icon and the formula popup will open
- Click the delete link to delete the field. The popup will close and return you to the report page.