Define a calculated column

Related topics

On the exemplified printout in About working with columns, the calculated column is called MARGIN% (THIS PERIOD).

  1. Select the Work with reports menu item.
  2. On the main panel, select the applicable report and click Columns.
  3. You access Work with report columns. Click Add.
  4. On the detail panel, complete the fields as follows:
  5. Column number
    Enter 40.
    Column heading 1
    Enter “MARGIN%”.
    Column heading 2
    Enter “Period”.
    Column type
    Enter 92, which means “Calculated column”.
    Edit code
    Enter 1.
    Calculation
    In this field you enter the formula of the calculation. This column should show the margin expressed as a percentage. To calculate this column, you need the values in the SALES VALUE and COST columns. The formula should look like this:

    (SALES VALUE – COST) / SALES VALUE * 100
    Here, SALES VALUE is column 10, COST is column 30. In the calculation field this is expressed as (which you should enter in the field):

    (C10 – C30)/C10*100
    C means “Column”.
    Note: You cannot enter a column in the formula that has a higher number than the column you are working with. Since you are working with column 40 here, you are not allowed to use the columns 41-99.

    Click OK to update the column and exit the routine.

Related topics