C:\DITA\WKFS_oXygen_Files\fragments\webhelp.fragment.head.xml
Jump to main content C:\DITA\WKFS_oXygen_Files\fragments\webhelp.fragment.before.body.xml

# Summing tables

This section explains how to use the BeginSumIndex attributes to correctly sum additional items within a table.

- Typically, the summed column is formatted as a dollar amount; if necessary, verify that the column has a dollar output format.
- If the output format for the DTA that prints the amounts is set to the standard $1,234.50, the summed row's amount column will appear with a $ and two decimals. If the output format for that same DTA is set to plain numbers (1234), the summed row's amount will also print in plain numbers.
- Note that BeginSumIndex, MinIndex, and MaxIndex are based off the iterator index, not the overall index. For example if the IndexedPara/AddToIndex attribute is used to start at two (2) instead of one (1) the BeginSumIndex, MinIndex and MaxIndex do not take the AddToIndex value into consideration and must be one less than normal.

1. Create a table. On the tbody element, right-click and select Add Child Element/SortBy.
2. On the SortBy element, right-click and select Add Attribute/BeginSumIndex. This value should be one (1) greater than the MaxIndex value.

C:\DITA\WKFS_oXygen_Files\fragments\webhelp.fragment.after.body.xml