Sub value vs total in Pivot

Bilingual

Board Regular
Joined
Oct 1, 2010
Messages
186
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi, i have an Excel table, which contains Countries in one column and a number of variables in other columns, sales per month, average fee etc.

The very simple question is how i can create a Pivot table where one Country is matched up against the Total values for all countries!


Kind regards Daniel

Example

CountryAverage fee
US234
China44

<tbody>
</tbody>
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Oh ok. I just got what you need.

The pivot chart does not allow the option of showing the grand total. The workaround exists though. You can use a pivot and add the data to the Data Model and then copy and paste your pivot in a new location and keep it dynamic through the OLAP tools. You would basically have a separate table that looks exactly like a pivot and would get updated like the pivot does. You can then use this table to create a normal chart which will have both the country and the total.

First create the pivot: just like a normal pivot but when you get the pop up window for "Create PivotTable", check the "Add this data to the Data Model" box at the bottom of the pop up. Then proceed to what you normally do with a pivot. When done, select the entire pivot and copy it and paste it in a different location. In the pasted table, go to Analyze, OLAP Tools and select "Convert to formulas". You can then create a normal chart and filter on whichever country you want + the total. I would also recommend using a combo chart. Select the chart, go to Design, "Change Chart Type" and go to Combo. You can choose how you want your chart to look like and then select the % line to appear on a secondary axis.


You can find some instructions here for the OLAP part: Display data from the Grand Total column of a Pivot Table on a Stacked Pivot Chart
For the chart: https://support.office.com/en-au/ar...ary-axis-1d119e2d-1a5f-45a4-8ad3-bacc7430c0a1

As an FYI, when you select to add the data to the Data Model, you can use PowerPivot tools. This comes with a free MS addin: https://www.microsoft.com/en-us/download/details.aspx?id=7609.

Also attached:https://www.dropbox.com/s/pk17873g5pb0bug/Average.xlsx?dl=0

Alex
 
Upvote 0
Oh ok. I just got what you need.

The pivot chart does not allow the option of showing the grand total. The workaround exists though. You can use a pivot and add the data to the Data Model and then copy and paste your pivot in a new location and keep it dynamic through the OLAP tools. You would basically have a separate table that looks exactly like a pivot and would get updated like the pivot does. You can then use this table to create a normal chart which will have both the country and the total.

First create the pivot: just like a normal pivot but when you get the pop up window for "Create PivotTable", check the "Add this data to the Data Model" box at the bottom of the pop up. Then proceed to what you normally do with a pivot. When done, select the entire pivot and copy it and paste it in a different location. In the pasted table, go to Analyze, OLAP Tools and select "Convert to formulas". You can then create a normal chart and filter on whichever country you want + the total. I would also recommend using a combo chart. Select the chart, go to Design, "Change Chart Type" and go to Combo. You can choose how you want your chart to look like and then select the % line to appear on a secondary axis.


You can find some instructions here for the OLAP part: Display data from the Grand Total column of a Pivot Table on a Stacked Pivot Chart
For the chart: https://support.office.com/en-au/ar...ary-axis-1d119e2d-1a5f-45a4-8ad3-bacc7430c0a1

As an FYI, when you select to add the data to the Data Model, you can use PowerPivot tools. This comes with a free MS addin: https://www.microsoft.com/en-us/download/details.aspx?id=7609.

Also attached:https://www.dropbox.com/s/pk17873g5pb0bug/Average.xlsx?dl=0

Alex

Hi Alex, thanks a lot, it worked fine, i really appreciate you valuable help :)
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,850
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top