The consolidated summary of every country can be seen, as shown in the following image.
Clicking the plus sign (+) hides the sub-items of each country.Clicking on “auto outline” groups the range included in the country-wise total.Click on “auto outline” in “group” under the Data tab. To each country, add subtotals manually, as shown in the following image.
In the field «Use function:» we assign the function «Sum». In the field «At each change in» we select the condition for data selection (in this example, «Value»).