# Inserting a calculation

Accountants Enterprise only

The Calculation field is a special type of numeric field that enables you to add basic mathematical operations involving expressions and functions to a practice template. You can reference the field name of a:

• numeric field

• calculation field

• account amount field

• date field (in special circumstances)

in a calculation. In a formula, ensure that you refer to any field names exactly. You must match the characters and the case sensitivity of the field names. For example, d1 is different to D1.

Calculations can be performed within table rows. Fields are entered on a row by row basis in a table. Each cell of each row has the same field names and calculations.

The following basic arithmetic is supported:

• - subtraction

• * multiplication

• / division

• ^ exponential

• () brackets.

## Functions

Calculations can use functions in their expressions. Four functions are currently defined:

• If (condition, true, false)
The If function corresponds to Microsoft Excel’s If function.
The most common use of this function is to avoid division by zero.
Example: If (C1 = 0, 0, ((N5 - N4) /C1) * 365) when C1 is zero then the calculation result is also zero. However, if C1 is any other number the calculation returns the result ((N5 - N4)/C1) * 365.

• Days (date field 1, date field 2)
The Days function returns the number of days between two date fields.
Example: Days (D1,D2). This example accepts two date field names D1 and D2 and returns the number of days between the two values. An absolute value is returned so the result will never be negative.

• FirstRow
The FirstRow function can only be used for calculations within data entry tables. The FirstRow function will return a true value when the calculation being performed is on the first row of a table.

• Above

The Above function can only be used for calculations within data entry tables. The Above function accepts a column field name and returns a numeric value for the column immediately above the row being calculated. For the first row in a table, the Above function will return a zero.

How to insert a column sum calculation field in a practice template Ensure that you refer to any field names exactly. You must match the characters and the case sensitivity of the field names. For example, d1 is different to D1.

1. Open the practice template for editing. See Opening a practice template for editing.
2. Position the mouse cursor in the practice template where the new field is to be inserted.
3. Click Insert Field on the toolbar.
or
Select Insert > Field on the main menu. The Insert Field window opens.
4. Select Calculation
5. Click OK. The Calculation window opens.
6. Enter a Field name for the Calculation field. The Field name is automatically filled when the Calculation window opens. You can accept the default or overwrite it. The system will allocate the next sequential number prefixed by a C for calculation fields.
If you decide to overwrite the default Field name, then enter a unique Field name. Conditions for the Field name :
• It is limited to a maximum of 30 alphanumeric characters.

• It must not start with a number, as this affects the calculations.

• It must not contain any spaces.

• It may contain an underscore as part of the name.

• It is not case sensitive.

7. Select the Calculation type to be Column sum of number field.
This option enables you to add the column of numbers selected from the drop-down. This option is most commonly used within a data entry table.
8. Select the Format of the displayed calculation result from the drop-down.
The Number - 2 decimal places and the Number - no decimal options display with no formatting and no commas e.g., 2478.55. The Currency option displays the account balance with a thousands separator and a currency value as set by the regional settings, e.g., \$2,478.55. With all options, negative numbers are displayed with a leading minus sign, e.g., -2478.55.
9. Tick the Include comma separators checkbox if you want to include a comma as a thousands separator.

10. Select the Show this number when zero option, if required.

11. Select the This calculation is part of the Workpaper’s journal option, if required. If this option is selected, when you prepare a workpaper and select to create a journal, the calculated amount will be automatically included in the new journal. Any calculation fields that have this option selected will be listed in the journal. This option is most commonly used for the variance field so that a journal can be created automatically from the variance amount. Several fields in a single workpaper can be used to create workpaper journals.

12. If you have selected the This calculation is part of the Workpaper’s journal option, and you want to include quantities rather than an actual balance (for example, for farm accounting):+
1. Click the Edit journal settings... button. The Edit journal settings window displays.

2. In the Account section, select the Post to the linked account option or select an account from the Post to the account selected in this field dropdown, depending on where you want the amount to be posted.

3. Select the Post as quantity option in the Balance type section.

4. Click OK.
5. Select the Rollover value to next period option, if required.
Select this option if the properties of the template have been flagged to be rolled over. This option enables you to select which field will be rolled forward to this amount.

For example, a closing balance of a workpaper can be rolled forward automatically to the opening balance in the next period.
6. Select the appropriate field that will display the calculated amount in the next period from the drop-down.

7. Select the This calculation is the number to balance the linked account against option, if required.If this option is selected, then the result of this calculation is used to balance the linked account.A red flag on the Prepare Workpapers table will be displayed when the result of this calculation in the attached document does not match the final account balance. You can use one or more calculations as balance checks. A red flag will display in the Prepare Workpapers table if any one of them is out of balance.

13. Select the Display a red flag icon in the Prepare Workpapers list if a discrepancy exists option, if required.

14. (Australia) If this calculation is to be mapped to a Tax Return field, select Field to be mapped to Tax Return. The Tax Return field mapping code field is editable. Select the Tax Return field mapping code.

15. Click OK. The Calculation field is placed at the insertion point. The Calculation window and the Insert Field window close.
How to use a calculation result from another workpaper in a practice template Ensure that you refer to any field names exactly. You must match the characters and the case sensitivity of the field names. For example, d1 is different to D1.

1. Open the practice template for editing. See Opening a practice template for editing.
2. Position the mouse cursor in the practice template where the new field is to be inserted.
3. Click Insert Field on the toolbar.
or
Select Insert >Field on the main menu. The Insert Field window opens.
4. Select Calculation.
5. Click OK. The Calculationwindow opens.
6. Enter a Field name for the Calculation field. The Field name is automatically filled when the Calculation window opens. You can accept the default or overwrite it. The system will allocate the next sequential number prefixed by a C for calculation fields. If you decide to overwrite the default Field name, then enter a unique Field name. Conditions for the Field name:
• It is limited to a maximum of 30 alphanumeric characters.

• It must not start with a number, as this affects the calculations.

• It must not contain any spaces.

• It may contain an underscore as part of the name.

• It is not case sensitive.

7. Select the Calculation type to be Calculation result from another Workpaper. This option enables you to select a calculation field from another workpaper template that will be used for this calculation. For example, you could use an existing calculation in the Income Tax Provision workpaper for the Income Tax Expense workpaper.
8. Click Setup. TheTemplate Calculation Fields window opens.
9. Expand the Field Name by clicking the + adjacent to the Field Name. The Field Name expands to list all of the associated fields and calculations. This list will not include any field names and calculations associated with the current practice template. This list will also not include any calculation fields that are embedded in table rows.
10. Select the appropriate calculation.
11. Click OK. The Template Calculation Fields window closes. The selected template and calculation field are reflected in the Template and Field fields on the Calculation  window. A Link button is displayed in the actual workpaper adjacent to the calculation.
12. Select the Format of the displayed calculation result from the drop-down. The Number - 2 decimal places and the Number - no decimal options display with no formatting and no commas e.g., 2478.55. The Currency option displays the account balance with a thousands separator and a currency value as set by the regional settings, e.g., \$2,478.55. With all options, negative numbers are displayed with a leading minus sign, e.g., -2478.55.
13. Select the Show this number when zero option, if required.
14. Select the This calculation is part of the Workpaper’s journal option, if required. If this option is selected, when you prepare a workpaper and select to create a journal, the calculated amount will be automatically included in the new journal. Any calculation fields that have this option selected will be listed in the journal. This option is most commonly used for the variance field so that a journal can be created automatically from the variance amount. Several fields in a single workpaper can be used to create workpaper journals.

15. Select the Rollover value to next period option, if required.
Select this option if the properties of the template have been flagged to be rolled over. This option enables you to select which field will be rolled forward to this amount.
For example, a closing balance of a workpaper can be rolled forward automatically to the opening balance in the next period.
16. Select the appropriate field that will display the calculated amount in the next period from the drop-down.

17. Select the This calculation is the number to balance the linked account against option, if required. If this option is selected, then the result of this calculation is used to balance the linked account. A red flag on the Prepare Workpapers table will be displayed when the result of this calculation in the attached document does not match the final account balance. You can use one or more calculations as balance checks. A red flag will display in the Prepare Workpapers table if any one of them is out of balance.

18. Select the Display a red flag icon in the Prepare Workpapers list if a discrepancy exists option, if required.

19. If this calculation is to be mapped to a Tax Return field, select Field to be mapped to Tax Return. The Tax Return field mapping code field is editable. Select the Tax Return field mapping code.

20. Click OK. The Calculation field is placed at the insertion point. The Calculation window and the Insert Field window close.
How to insert a customised calculation field in a practice template
1. Open the practice template for editing. See Opening a practice template for editing.
2. Position the mouse cursor in the practice template where the new field is to be inserted.
3. Click Insert Field on the toolbar.
or
Select Insert > Field on the main menu. The Insert Field window opens.
4. Select Calculation.
5. Click OK. The Calculation window opens.
6. Enter a Field name for the Calculation field. The Field name is automatically filled when the Calculation window opens. You can accept the default or overwrite it. The system will allocate the next sequential number prefixed by a C for calculation fields. If you decide to overwrite the default Field name, then enter a unique Field name. Conditions for the Field name:
• It is limited to a maximum of 30 alphanumeric characters.

• It must not start with a number, as this affects the calculations.

• It must not contain any spaces.

• It may contain an underscore as part of the name.

• It is not case sensitive.

7. Select the Calculation type to be Other calculation. This option enables you to create your own calculation using the listed mathematical symbols and groupings. The calculation expressions are not case sensitive.
• Consider the formula you would like to use.

• Select the field to be included in the calculation using the drop-down.

• Click Insert to place the field in the formula.

• Continue creating your calculation formula and inserting fields as required.

8. Select the Format of the displayed calculation result from the drop-down. The Number - 2 decimal places and the Number - no decimal options display with no formatting and no commas e.g., 2478.55. The Currency option displays the account balance with a thousands separator and a currency value as set by the regional settings, e.g., \$2,478.55. With all options, negative numbers are displayed with a leading minus sign, e.g., -2478.55. Ensure that you refer to any field names exactly. You must match the characters and the case sensitivity of the field names. For example, d1 is different to D1.

9. Select the Show this number when zero option, if required.

10. Select the This calculation is part of the Workpaper’s journal option, if required. If this option is selected, when you prepare a workpaper and select to create a journal, the calculated amount will be automatically included in the new journal. Any calculation fields that have this option selected will be listed in the journal. This option is most commonly used for the variance field so that a journal can be created automatically from the variance amount. Several fields in a single workpaper can be used to create workpaper journals.

11. Select the Rollover value to next period option, if required.
Select this option if the properties of the template have been flagged to be rolled over. This option enables you to select which field will be rolled forward to this amount.
For example, a closing balance of a workpaper can be rolled forward automatically to the opening balance in the next period.
12. Select the appropriate field that will display the calculated amount in the next period from the drop-down.
13. Select the Display a red flag icon in the Prepare Workpapers list if a discrepancy exists option, if required. A red flag on the Prepare Workpapers table will be displayed when the result of this calculation in the attached document does not match the condition selected in Red flag settings.
14. If this calculation is to be mapped to a Tax Return field, select Field to be mapped to Tax Return. The Tax Return field mapping code field is editable. Select the Tax Return field mapping code.
15. Click OK. The Calculation field is placed at the insertion point. The Calculation window and the Insert Field window close.

JavaScript errors detected