Summarizing Value Rows
In this example, we're adding three columns in the table that summarize row values (horizontal summary). This is done by adding Crosstab Row Summary Column elements to the Crosstab Filter:
The first of these elements refers to the original Value column defined in the Crosstab Filter attributes, Quantity, so all that is required is that the element be added beneath the filter, be given an ID, and its summarizing function be set to Sum, as shown above.
The second element of this type is summarizing an Extra Crosstab Value Column ("ODTotal") so it needs to include that elements's ID, as highlighted in yellow above, in the Extra Crosstab Value Column ID attribute.
Three Crosstab Table Label Columns are also added to display the summarized values. The first two reference their data using Label elements and standard tokens @Data.crsSumQuantity~ and @Data.crsSumODTotal~. The third one divides the other two using the formula =@Data.crsSumODTotal~/@Data.crsSumQuantity~to derive its value.
Referring to our layout model, the addition of the Crosstab Row Summary Column elements adds the columns highlighted in yellow above.
And, in a Preview, the table now looks like the image shown above.
For information about summarizing columns, see Summarizing Value Columns and Comparing, Sorting, and Summarizing Columns.