Group and Subtotal Data in an Excel Template
You can group and subtotal columns of merged data using the “Group” and “Subtotal” parameters. For more information, see Excel Merge Field Parameters.
In the following example, we demonstrate how to group and subtotal Opportunity Line Items by Product Family.