Recalculating totals after applying a filter
When filtering data at the report element or group level, you can choose to recalculate totals or not. For example, a table displays sales data for each country, as well as, a sales grand total. If you apply a filter to exclude certain countries, you can specify whether to calculate a new total for the reduced number of countries, or keep the original total calculated for all countries. While the first option is typical (and is the default), you might opt for the second option if you want to see the full sales total while omitting sales data for certain countries.
A common reason for not recalculating totals after filtering rows is a summary report that displays totals and percentages. The table in Figure 12‑17, for example, displays sales totals and percentages for the top five sales representatives. The header, Overall Sales Total, displays the sales grand total for the entire team of sales representatives.
Figure 12‑17 Table displaying sales totals and percentages
This table groups sales data rows by sales representatives. To display only the top five sales representatives, the following filter, as shown in Figure 12‑18, is specified in the group definition:
row["Total_Sales"] Top n 5
Figure 12‑18 Filter condition to return the top five sales representatives
In the filter tool, the Recalculate Totals option is not selected for these reasons:
*The overall sales total, as displayed in the table header, should show the sales total for the entire team of sales representatives.
*The sales percentage for each sales representative should be calculated as a percentage of the overall sales total.
If the Recalculate Totals option had been selected, the overall sales total would be the sum of the sales totals for the five representatives. Similarly, the sales percentage for each sales representative would be calculated as a percentage of the total sales for the five representatives. Figure 12‑19 shows the new calculations.
Figure 12‑19 Table displaying recalculated sales percentages and overall total