Calculation examples
Accountants Enterprise only
Example 1
A workpaper may define three numeric fields - N1, N2 and N3. A calculation field, C1, can reference these numeric fields by name in order to perform mathematical operations. The following are all valid expressions:
N1 + N2 + N3
N1*(N2 - N3 +1) + ((N1 + N2 + N3)/3.09)
N3^2 + N1
Example 2
Calculations may use the results of other calculations. A workpaper may contain two numeric (N1, N2) and two calculation fields (C1, C2) where:
C1 = N1 + N2
C2 = C1 * 1.1
C2 must always be calculated after C1 as the software will not automatically do this. Instead define a calculation sequence value, where:
C1 has a sequence of 0 and C2 has a sequence of 1.
lower sequence numbers allow their calculations to be performed before higher ones.
Example 3
Example of calculations in tables.
In the Designer only one row is visible
Header 1 | Header 2 | Header 3 | Header 4 |
---|---|---|---|
N1 | N2 | N3 | C1=N1 + N2 + N3 |
In a workpaper each cell will have the same field names:
Header 1 | Header 2 | Header 3 | Header 4 |
---|---|---|---|
N1 | N2 | N3 | C1=N1 + N2 + N3 |
N1 | N2 | N3 | C1=N1 + N2 + N3 |
N1 | N2 | N3 | C1=N1 + N2 + N3 |
Example 4
Using the Days function (D1, D2):
D1 = 10/05/2012
D2 = 17/05/2012
then Days (D1, D2) = 7
Example 5
Using the FirstRow and Above functions:
If(FirstRow(), N1 + N2 - N3, Above (C1) + N2 - N3).
This calculation enables running totals to be calculated.
N1 | |||
---|---|---|---|
Row 1 | N2 | N3 | C1 = N1 + N2 - N3 |
Row 2 | N2 | N3 | C1 = C1 + N2 - N3 |
Row 3 | N2 | N3 | C1 = C1 + N2 - N3 |