Subtotal

Syntax

Subtotal

See also: Total

Summary

Subtotal calculates the sum of the immediately neighboring branches above the current branch with the same data units as the current branch.  If more than one subtotal branches are included in a group of neighboring branches, the subtotal will include the sum of the value in all branches above the current branch and below the previous Subtotal branch.

For example consider the following expressions in 8 immediately neighboring branches:

Branch

Expression

Result

a

1

1

b

2

2

c

Subtotal

3

d

3

3

e

4

4

f

Subtotal

7

g

5

5

h

Total

15